Feature: Add ability to disable auto assignment of conversations (#513)

This commit is contained in:
Tim Lange 2020-02-19 10:10:03 +01:00 committed by GitHub
parent e0afb84502
commit 30e5edf6dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 377 additions and 230 deletions

View file

@ -97,6 +97,17 @@ RSpec.describe Conversation, type: :model do
# run_round_robin
expect(conversation.reload.assignee).to eq(agent)
end
it 'will not auto assign agent if enable_auto_assignment is false' do
inbox.update(enable_auto_assignment: false)
# send_events
expect(Rails.configuration.dispatcher).to have_received(:dispatch)
.with(described_class::CONVERSATION_CREATED, kind_of(Time), conversation: conversation)
# run_round_robin
expect(conversation.reload.assignee).to eq(nil)
end
end
describe '#update_assignee' do