Fix RSpec/MessageSpies
cop (#27751)
This commit is contained in:
parent
ae0d551d33
commit
49e2772064
19 changed files with 162 additions and 94 deletions
|
@ -6,14 +6,20 @@ describe StatusLengthValidator do
|
|||
describe '#validate' do
|
||||
it 'does not add errors onto remote statuses' do
|
||||
status = instance_double(Status, local?: false)
|
||||
allow(status).to receive(:errors)
|
||||
|
||||
subject.validate(status)
|
||||
expect(status).to_not receive(:errors)
|
||||
|
||||
expect(status).to_not have_received(:errors)
|
||||
end
|
||||
|
||||
it 'does not add errors onto local reblogs' do
|
||||
status = instance_double(Status, local?: false, reblog?: true)
|
||||
allow(status).to receive(:errors)
|
||||
|
||||
subject.validate(status)
|
||||
expect(status).to_not receive(:errors)
|
||||
|
||||
expect(status).to_not have_received(:errors)
|
||||
end
|
||||
|
||||
it 'adds an error when content warning is over 500 characters' do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue