Sha256: e1129e9b4db85043eab3383ab3ad51c07621253fcb237b2ac8251771c9c87916
Contents?: true
Size: 814 Bytes
Versions: 11
Compression:
Stored size: 814 Bytes
Contents
require 'spec_helper' describe "Intercom::Tag" do it "gets a tag" do Intercom.expects(:get).with("/v1/tags", {:name => "Test Tag"}).returns(test_tag) tag = Intercom::Tag.find(:name => "Test Tag") tag.name.must_equal "Test Tag" end it "creates a tag" do Intercom.expects(:post).with("/v1/tags", {:name => "Test Tag"}).returns(test_tag) tag = Intercom::Tag.create(:name => "Test Tag") tag.name.must_equal "Test Tag" end it "tags users" do Intercom.expects(:post).with("/v1/tags", {:name => "Test Tag", :user_ids => ["abc123", "def456"], :tag_or_untag => "tag"}).returns(test_tag) tag = Intercom::Tag.create(:name => "Test Tag", :user_ids => ["abc123", "def456"], :tag_or_untag => "tag") tag.name.must_equal "Test Tag" tag.tagged_user_count.must_equal 2 end end
Version data entries
11 entries across 11 versions & 1 rubygems