Feature: Contact Merge Action (#378)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user