feat: Add an action on automation to change the priority (#6925)
This commit is contained in:
@@ -11,5 +11,21 @@ describe ::ActionService do
|
||||
expect(conversation.reload.status).to eq('resolved')
|
||||
end
|
||||
end
|
||||
|
||||
describe '#change_priority' do
|
||||
let(:conversation) { create(:conversation) }
|
||||
let(:action_service) { described_class.new(conversation) }
|
||||
|
||||
it 'changes the priority of the conversation to medium' do
|
||||
action_service.change_priority(['medium'])
|
||||
expect(conversation.reload.priority).to eq('medium')
|
||||
end
|
||||
|
||||
it 'changes the priority of the conversation to nil' do
|
||||
action_service.change_priority(['nil'])
|
||||
expect(conversation.reload.priority).to be_nil
|
||||
end
|
||||
end
|
||||
|
||||
# TODO: Expand this test suite
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user