Update rubocop-rspec to version 2.22.0, fix RSpec/IndexedLet
cop (#24698)
This commit is contained in:
parent
24015ef0cc
commit
4c5aa0e470
25 changed files with 334 additions and 322 deletions
|
@ -6,9 +6,9 @@ RSpec.describe UnallowDomainService, type: :service do
|
|||
subject { described_class.new }
|
||||
|
||||
let!(:bad_account) { Fabricate(:account, username: 'badguy666', domain: 'evil.org') }
|
||||
let!(:bad_status1) { Fabricate(:status, account: bad_account, text: 'You suck') }
|
||||
let!(:bad_status2) { Fabricate(:status, account: bad_account, text: 'Hahaha') }
|
||||
let!(:bad_attachment) { Fabricate(:media_attachment, account: bad_account, status: bad_status2, file: attachment_fixture('attachment.jpg')) }
|
||||
let!(:bad_status_harassment) { Fabricate(:status, account: bad_account, text: 'You suck') }
|
||||
let!(:bad_status_mean) { Fabricate(:status, account: bad_account, text: 'Hahaha') }
|
||||
let!(:bad_attachment) { Fabricate(:media_attachment, account: bad_account, status: bad_status_mean, file: attachment_fixture('attachment.jpg')) }
|
||||
let!(:already_banned_account) { Fabricate(:account, username: 'badguy', domain: 'evil.org', suspended: true, silenced: true) }
|
||||
let!(:domain_allow) { Fabricate(:domain_allow, domain: 'evil.org') }
|
||||
|
||||
|
@ -31,8 +31,8 @@ RSpec.describe UnallowDomainService, type: :service do
|
|||
end
|
||||
|
||||
it 'removes the remote accounts\'s statuses and media attachments' do
|
||||
expect { bad_status1.reload }.to raise_exception ActiveRecord::RecordNotFound
|
||||
expect { bad_status2.reload }.to raise_exception ActiveRecord::RecordNotFound
|
||||
expect { bad_status_harassment.reload }.to raise_exception ActiveRecord::RecordNotFound
|
||||
expect { bad_status_mean.reload }.to raise_exception ActiveRecord::RecordNotFound
|
||||
expect { bad_attachment.reload }.to raise_exception ActiveRecord::RecordNotFound
|
||||
end
|
||||
end
|
||||
|
@ -57,8 +57,8 @@ RSpec.describe UnallowDomainService, type: :service do
|
|||
end
|
||||
|
||||
it 'removes the remote accounts\'s statuses and media attachments' do
|
||||
expect { bad_status1.reload }.to_not raise_error
|
||||
expect { bad_status2.reload }.to_not raise_error
|
||||
expect { bad_status_harassment.reload }.to_not raise_error
|
||||
expect { bad_status_mean.reload }.to_not raise_error
|
||||
expect { bad_attachment.reload }.to_not raise_error
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue