1
0
Fork 0
forked from gitea/nas

Merge pull request #462 from kmycode/upstream-20240115

Upstream 20240115
This commit is contained in:
KMY(雪あすか) 2024-01-15 19:58:03 +09:00 committed by GitHub
commit 90bd2a0f00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
341 changed files with 1113 additions and 558 deletions

View file

@ -1222,27 +1222,4 @@ RSpec.describe Account do
expect(subject.reload.followers_count).to eq 15
end
end
describe '.followable_by' do
context 'with follows and follow requests' do
let!(:account) { Fabricate(:account) }
let!(:eligible_account) { Fabricate(:account) }
let!(:following_account) { Fabricate(:account) }
let!(:follow_requested_account) { Fabricate(:account) }
before do
Fabricate :follow, account: account, target_account: following_account
Fabricate :follow_request, account: account, target_account: follow_requested_account
end
it 'returns accounts not already following or requested to follow' do
results = described_class.followable_by(account)
expect(results)
.to include(eligible_account)
.and not_include(following_account)
.and not_include(follow_requested_account)
end
end
end
end