mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-02-02 13:03:05 -05:00
Make Account#mute! spec expect returned Mute (#193)
This commit is contained in:
parent
5e6a09498a
commit
041168df31
@ -119,9 +119,9 @@ describe AccountInteractions do
|
||||
context 'arg :notifications is nil' do
|
||||
let(:arg_notifications) { nil }
|
||||
|
||||
it 'creates Mute, and returns nil' do
|
||||
it 'creates and returns a Mute' do
|
||||
expect do
|
||||
expect(account.mute!(target_account, notifications: arg_notifications)).to be nil
|
||||
expect(account.mute!(target_account, notifications: arg_notifications)).to be_instance_of(Mute)
|
||||
end.to change { account.mute_relationships.count }.by 1
|
||||
end
|
||||
end
|
||||
@ -129,9 +129,9 @@ describe AccountInteractions do
|
||||
context 'arg :notifications is false' do
|
||||
let(:arg_notifications) { false }
|
||||
|
||||
it 'creates Mute, and returns nil' do
|
||||
it 'creates and returns a Mute' do
|
||||
expect do
|
||||
expect(account.mute!(target_account, notifications: arg_notifications)).to be nil
|
||||
expect(account.mute!(target_account, notifications: arg_notifications)).to be_instance_of(Mute)
|
||||
end.to change { account.mute_relationships.count }.by 1
|
||||
end
|
||||
end
|
||||
@ -139,9 +139,9 @@ describe AccountInteractions do
|
||||
context 'arg :notifications is true' do
|
||||
let(:arg_notifications) { true }
|
||||
|
||||
it 'creates Mute, and returns nil' do
|
||||
it 'creates and returns a Mute' do
|
||||
expect do
|
||||
expect(account.mute!(target_account, notifications: arg_notifications)).to be nil
|
||||
expect(account.mute!(target_account, notifications: arg_notifications)).to be_instance_of(Mute)
|
||||
end.to change { account.mute_relationships.count }.by 1
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user