chore: API improvements (#3637)
- Unique validations for Inbox members and Team member objects - Move notification processing to Async
This commit is contained in:
@@ -78,19 +78,9 @@ shared_examples_for 'assignment_handler' do
|
||||
expect(conversation.reload.assignee).to eq(agent)
|
||||
end
|
||||
|
||||
it 'creates a new notification for the agent' do
|
||||
it 'dispaches assignee changed event' do
|
||||
expect(EventDispatcherJob).to(have_been_enqueued.at_least(:once).with('assignee.changed', anything, anything))
|
||||
expect(update_assignee).to eq(true)
|
||||
expect(agent.notifications.count).to eq(1)
|
||||
end
|
||||
|
||||
it 'does not create assignment notification if notification setting is turned off' do
|
||||
notification_setting = agent.notification_settings.first
|
||||
notification_setting.unselect_all_email_flags
|
||||
notification_setting.unselect_all_push_flags
|
||||
notification_setting.save!
|
||||
|
||||
expect(update_assignee).to eq(true)
|
||||
expect(agent.notifications.count).to eq(0)
|
||||
end
|
||||
|
||||
context 'when agent is current user' do
|
||||
|
||||
Reference in New Issue
Block a user