0
0
Fork 0

Fix Performance/MapMethodChain cop (#27744)

This commit is contained in:
Matt Jankowski 2023-11-07 08:01:09 -05:00 committed by GitHub
parent bbad5b6456
commit 45770c9306
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 20 deletions

View file

@ -232,9 +232,9 @@ RSpec.describe ImportService, type: :service do
it 'adds the toots the user has access to to bookmarks' do
local_status = Fabricate(:status, account: local_account, uri: 'https://local.com/users/foo/statuses/42', id: 42, local: true)
subject.call(import)
expect(account.bookmarks.map(&:status).map(&:id)).to include(local_status.id)
expect(account.bookmarks.map(&:status).map(&:id)).to include(remote_status.id)
expect(account.bookmarks.map(&:status).map(&:id)).to_not include(direct_status.id)
expect(account.bookmarks.map { |bookmark| bookmark.status.id }).to include(local_status.id)
expect(account.bookmarks.map { |bookmark| bookmark.status.id }).to include(remote_status.id)
expect(account.bookmarks.map { |bookmark| bookmark.status.id }).to_not include(direct_status.id)
expect(account.bookmarks.count).to eq 3
end
end