spec/unit/intercom/conversation_spec.rb in intercom-3.1.0 vs spec/unit/intercom/conversation_spec.rb in intercom-3.2.0

- old
+ new

@@ -16,9 +16,14 @@ it 'replies to a conversation' do client.expects(:post).with('/conversations/147/reply', { type: 'user', body: 'Thanks again', message_type: 'comment', user_id: 'ac4', conversation_id: '147' }).returns(test_conversation) client.conversations.reply(id: '147', type: 'user', body: 'Thanks again', message_type: 'comment', user_id: 'ac4') end + it 'replies to a conversation with an attachment' do + client.expects(:post).with('/conversations/147/reply', { type: 'user', body: 'Thanks again', message_type: 'comment', user_id: 'ac4', conversation_id: '147', attachment_urls: ["http://www.example.com/attachment.jpg"] }).returns(test_conversation) + client.conversations.reply(id: '147', type: 'user', body: 'Thanks again', message_type: 'comment', user_id: 'ac4', attachment_urls: ["http://www.example.com/attachment.jpg"]) + end + it 'opens a conversation' do client.expects(:post).with('/conversations/147/reply', { type: 'admin', message_type: 'open', conversation_id: '147', admin_id: '123'}).returns(test_conversation) client.conversations.open(id: '147', admin_id: '123') end