Sha256: 86193680ea35d3ad7aa8e46cc5c7c0e63e9bbbd90123070f6f71f341b6454a97

Contents?: true

Size: 489 Bytes

Versions: 15

Compression:

Stored size: 489 Bytes

Contents

require "spec_helper"

describe "Intercom::Admin" do
  let (:client) { Intercom::Client.new(app_id: 'app_id',  api_key: 'api_key') }

  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 an admin list' do
    client.expects(:get).with("/admins", {}).returns(test_admin_list)
    client.admins.all.each { |a| }
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
intercom-3.5.4 spec/unit/intercom/admin_spec.rb
intercom-3.5.3 spec/unit/intercom/admin_spec.rb
intercom-3.5.2 spec/unit/intercom/admin_spec.rb
intercom-3.5.1 spec/unit/intercom/admin_spec.rb
intercom-3.4.0 spec/unit/intercom/admin_spec.rb
intercom-3.3.0 spec/unit/intercom/admin_spec.rb
intercom-3.2.0 spec/unit/intercom/admin_spec.rb
intercom-3.1.0 spec/unit/intercom/admin_spec.rb
intercom-3.0.6 spec/unit/intercom/admin_spec.rb
intercom-3.0.5 spec/unit/intercom/admin_spec.rb
intercom-3.0.4 spec/unit/intercom/admin_spec.rb
intercom-3.0.3 spec/unit/intercom/admin_spec.rb
intercom-3.0.2 spec/unit/intercom/admin_spec.rb
intercom-3.0.0 spec/unit/intercom/admin_spec.rb
intercom-3.0.0b1 spec/unit/intercom/admin_spec.rb