Fix RSpec/ExpectChange cop (#25101)
This commit is contained in:
parent
1caa5ff39e
commit
d2e5430d4a
12 changed files with 24 additions and 41 deletions
|
@ -33,7 +33,7 @@ RSpec.describe UnsuspendAccountService, type: :service do
|
|||
end
|
||||
|
||||
it 'does not change the “suspended” flag' do
|
||||
expect { subject }.to_not change { account.suspended? }
|
||||
expect { subject }.to_not change(account, :suspended?)
|
||||
end
|
||||
|
||||
include_examples 'with common context' do
|
||||
|
@ -86,7 +86,7 @@ RSpec.describe UnsuspendAccountService, type: :service do
|
|||
end
|
||||
|
||||
it 'does not change the “suspended” flag' do
|
||||
expect { subject }.to_not change { account.suspended? }
|
||||
expect { subject }.to_not change(account, :suspended?)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -110,7 +110,7 @@ RSpec.describe UnsuspendAccountService, type: :service do
|
|||
end
|
||||
|
||||
it 'marks account as suspended' do
|
||||
expect { subject }.to change { account.suspended? }.from(false).to(true)
|
||||
expect { subject }.to change(account, :suspended?).from(false).to(true)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue