Sha256: 7f7f336d354e47b280a7e8dbd5f5d6232be35fa20d594ff7d89606ed2910ae73
Contents?: true
Size: 690 Bytes
Versions: 24
Compression:
Stored size: 690 Bytes
Contents
require "spec_helper" describe "/v1/notes" do it "creates a note" do Intercom.expects(:post).with("/v1/users/notes", {"body" => "Note to leave on user"}).returns({"html" => "<p>Note to leave on user</p>", "created_at" => 1234567890}) note = Intercom::Note.create("body" => "Note to leave on user") note.html.must_equal "<p>Note to leave on user</p>" end it "sets/gets allowed keys" do params = {"body" => "Note body", "email" => "me@example.com", :user_id => "abc123"} note = Intercom::Note.new(params) note.to_hash.keys.sort.must_equal params.keys.map(&:to_s).sort params.keys.each do | key| note.send(key).must_equal params[key] end end end
Version data entries
24 entries across 24 versions & 1 rubygems