From 88fc18617db44af3d5aaa2fc9b89addbec561ad7 Mon Sep 17 00:00:00 2001 From: Sojan Jose Date: Fri, 16 Jan 2026 00:40:14 -0800 Subject: [PATCH] Fix macro assignment spec --- spec/controllers/api/v1/accounts/macros_controller_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/controllers/api/v1/accounts/macros_controller_spec.rb b/spec/controllers/api/v1/accounts/macros_controller_spec.rb index 87d301d88..743caf0a8 100644 --- a/spec/controllers/api/v1/accounts/macros_controller_spec.rb +++ b/spec/controllers/api/v1/accounts/macros_controller_spec.rb @@ -388,7 +388,7 @@ RSpec.describe 'Api::V1::Accounts::MacrosController', type: :request do headers: administrator.create_new_auth_token end - expect(conversation.messages.activity.last.content).to eq("Assigned to #{user_1.name} by #{administrator.name}") + expect(conversation.reload.assignee).to eq(user_1) end it 'Assign the agent when he is not inbox member' do @@ -402,7 +402,7 @@ RSpec.describe 'Api::V1::Accounts::MacrosController', type: :request do headers: administrator.create_new_auth_token end - expect(conversation.messages.activity.last.content).not_to eq("Assigned to #{user_1.name} by #{administrator.name}") + expect(conversation.reload.assignee).to be_nil end it 'Assign the labels' do