Sha256: 73b39339b42632eee3c33100d83fc5037046d0cbbec4cc55b986e2888e4b0b87
Contents?: true
Size: 739 Bytes
Versions: 35
Compression:
Stored size: 739 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
35 entries across 35 versions & 1 rubygems