Make Account#mute! spec expect returned Mute (#193)

This commit is contained in:
David Yip 2018-01-26 10:09:20 -06:00
parent 5e6a09498a
commit 041168df31
No known key found for this signature in database
GPG Key ID: 7DA0036508FCC0CC
1 changed files with 6 additions and 6 deletions

View File

@ -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