spec/unit/intercom/conversation_spec.rb in intercom-3.6.1 vs spec/unit/intercom/conversation_spec.rb in intercom-3.6.2

- old
+ new

@@ -41,9 +41,14 @@ it 'assigns a conversation' do client.expects(:post).with('/conversations/147/reply', { type: 'admin', message_type: 'assignment', conversation_id: '147', admin_id: '123', assignee_id: '124'}).returns(test_conversation) client.conversations.assign(id: '147', admin_id: '123', assignee_id: '124') end + it 'snoozes a conversation' do + client.expects(:post).with('/conversations/147/reply', { type: 'admin', message_type: 'snoozed', conversation_id: '147', admin_id: '123', snoozed_until: tomorrow}).returns(test_conversation) + client.conversations.snooze(id: '147', admin_id: '123', snoozed_until: tomorrow) + end + # it "creates a subscription" do # client.expects(:post).with("/subscriptions", {'url' => "http://example.com", 'topics' => ["user.created"]}).returns(test_subscription) # subscription = client.subscriptions.create(:url => "http://example.com", :topics => ["user.created"]) # subscription.request.topics[0].must_equal "user.created" # subscription.request.url.must_equal "http://example.com"