remove 'inbox' attribute on Contact and use join table(ContactInbox) instead (#214)

This commit is contained in:
Ronald Walker
2019-11-17 19:27:41 -08:00
committed by Sojan Jose
parent 7ed1858284
commit 9256745193

View File

@@ -9,6 +9,7 @@ web_widget = Channel::WebWidget.create!(account: account, website_name: 'Acme',
inbox = Inbox.create!(channel: web_widget, account: account, name: 'Acme Support')
InboxMember.create!(user: user, inbox: inbox)
contact = Contact.create!(name: 'jane', email: 'jane@example.com', phone_number: '0000', inbox: inbox, account: account)
contact = Contact.create!(name: 'jane', email: 'jane@example.com', phone_number: '0000', account: account)
ContactInbox.create!(inbox: inbox, contact: contact, source_id: user.id)
conversation = Conversation.create!(account: account, inbox: inbox, status: :open, assignee: user, contact: contact)
Message.create!(content: 'Hello', account: account, inbox: inbox, conversation: conversation, message_type: :incoming)