mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-02 03:57:52 +00:00
feat: Ability to unmute muted conversations (#1319)
This commit is contained in:
committed by
GitHub
parent
2aad33a5be
commit
ecebe163e1
@@ -289,6 +289,22 @@ RSpec.describe Conversation, type: :model do
|
||||
end
|
||||
end
|
||||
|
||||
describe '#unmute!' do
|
||||
subject(:unmute!) { conversation.unmute! }
|
||||
|
||||
let(:conversation) { create(:conversation).tap(&:mute!) }
|
||||
|
||||
it 'does not change conversation status' do
|
||||
expect { unmute! }.not_to(change { conversation.reload.status })
|
||||
end
|
||||
|
||||
it 'marks conversation as muted in redis' do
|
||||
expect { unmute! }
|
||||
.to change { Redis::Alfred.get(conversation.send(:mute_key)) }
|
||||
.to nil
|
||||
end
|
||||
end
|
||||
|
||||
describe '#muted?' do
|
||||
subject(:muted?) { conversation.muted? }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user