From 041168df3109cde4b0b3de8d39ee9492acd77ad2 Mon Sep 17 00:00:00 2001 From: David Yip Date: Fri, 26 Jan 2018 10:09:20 -0600 Subject: [PATCH] Make Account#mute! spec expect returned Mute (#193) --- spec/models/concerns/account_interactions_spec.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/models/concerns/account_interactions_spec.rb b/spec/models/concerns/account_interactions_spec.rb index 95bf9561d..0f504cfc1 100644 --- a/spec/models/concerns/account_interactions_spec.rb +++ b/spec/models/concerns/account_interactions_spec.rb @@ -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