chore: Refactor Automation Specs (#6796)
The current way of writing specs for automation in one single file automation_listener isn't effective. Hence we are breaking down the specs for each class into separate spec files. fixes: CW-1447
This commit is contained in:
15
spec/services/action_service_spec.rb
Normal file
15
spec/services/action_service_spec.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
require 'rails_helper'
|
||||
|
||||
describe ::ActionService do
|
||||
describe '#resolve_conversation' do
|
||||
let(:conversation) { create(:conversation) }
|
||||
let(:action_service) { described_class.new(conversation) }
|
||||
|
||||
it 'resolves the conversation' do
|
||||
expect(conversation.status).to eq('open')
|
||||
action_service.resolve_conversation(nil)
|
||||
expect(conversation.reload.status).to eq('resolved')
|
||||
end
|
||||
end
|
||||
# TODO: Expand this test suite
|
||||
end
|
||||
Reference in New Issue
Block a user