fix test cases

This commit is contained in:
Tanmay Deep Sharma
2025-08-01 01:47:47 +05:30
parent 5f03418ac9
commit 3af6e6c493
12 changed files with 139 additions and 26 deletions
@@ -1,6 +1,22 @@
require 'rails_helper'
RSpec.describe 'Conversation Assignment API', type: :request do
before do
# Stub GlobalConfig for assignment_v2 feature flag before any objects are created
allow(GlobalConfig).to receive(:get) do |key, default = nil|
case key
when 'assignment_v2'
nil
when 'assignment_v2_disabled'
false
when 'assignment_v2_disabled_inboxes'
[]
else
default
end
end
end
let(:account) { create(:account) }
describe 'POST /api/v1/accounts/{account.id}/conversations/<id>/assignments' do
@@ -1,6 +1,22 @@
require 'rails_helper'
RSpec.describe 'Conversations API', type: :request do
before do
# Stub GlobalConfig for assignment_v2 feature flag before any objects are created
allow(GlobalConfig).to receive(:get) do |key, default = nil|
case key
when 'assignment_v2'
nil
when 'assignment_v2_disabled'
false
when 'assignment_v2_disabled_inboxes'
[]
else
default
end
end
end
let(:account) { create(:account) }
describe 'GET /api/v1/accounts/{account.id}/conversations' do