Sha256: 0caf0289c942f6b0cecf536d23136c7736dc2ae850ca1be83fa3a7d01ebca497
Contents?: true
Size: 741 Bytes
Versions: 8
Compression:
Stored size: 741 Bytes
Contents
require "spec_helper" describe "Intercom::Admin" do let(:client) { Intercom::Client.new(token: 'token') } it "returns a CollectionProxy for all without making any requests" do client.expects(:execute_request).never all = client.admins.all _(all).must_be_instance_of(Intercom::ClientCollectionProxy) end it "gets me (access token method only)" do client.expects(:get).with("/me", {}).returns(test_admin) client.admins.me end it 'gets an admin list' do client.expects(:get).with("/admins", {}).returns(test_admin_list) client.admins.all.each { |a| } end it "gets an admin" do client.expects(:get).with("/admins/1234", {}).returns(test_admin) client.admins.find(:id => "1234") end end
Version data entries
8 entries across 8 versions & 1 rubygems