Feature: Contact Merge Action (#378)

This commit is contained in:
Sojan Jose
2019-12-24 13:27:25 +05:30
committed by Pranav Raj S
parent 32efe8676f
commit 7d85f2e046
13 changed files with 198 additions and 35 deletions

View File

@@ -11,10 +11,10 @@ describe ::ConversationFinder do
before do
create(:inbox_member, user: user_1, inbox: inbox)
create(:inbox_member, user: user_2, inbox: inbox)
create(:complete_conversation, account: account, inbox: inbox, assignee: user_1)
create(:complete_conversation, account: account, inbox: inbox, assignee: user_1)
create(:complete_conversation, account: account, inbox: inbox, assignee: user_1, status: 'resolved')
create(:complete_conversation, account: account, inbox: inbox, assignee: user_2)
create(:conversation, account: account, inbox: inbox, assignee: user_1)
create(:conversation, account: account, inbox: inbox, assignee: user_1)
create(:conversation, account: account, inbox: inbox, assignee: user_1, status: 'resolved')
create(:conversation, account: account, inbox: inbox, assignee: user_2)
end
describe '#perform' do
@@ -40,7 +40,7 @@ describe ::ConversationFinder do
let(:params) { { status: 'open', assignee_type_id: 0, page: 1 } }
it 'returns paginated conversations' do
create_list(:complete_conversation, 50, account: account, inbox: inbox, assignee: user_1)
create_list(:conversation, 50, account: account, inbox: inbox, assignee: user_1)
result = conversation_finder.perform
expect(result[:conversations].count).to be 25
end

View File

@@ -6,7 +6,7 @@ describe ::MessageFinder do
let!(:account) { create(:account) }
let!(:user) { create(:user, account: account) }
let!(:inbox) { create(:inbox, account: account) }
let!(:conversation) { create(:complete_conversation, account: account, inbox: inbox, assignee: user) }
let!(:conversation) { create(:conversation, account: account, inbox: inbox, assignee: user) }
before do
create(:message, account: account, inbox: inbox, conversation: conversation)