Sha256: 5e2c93ab0eb34f6568a66e6c8f1fc55eb38d8b8681e081ff579fd4a21beb417c

Contents?: true

Size: 1019 Bytes

Versions: 5

Compression:

Stored size: 1019 Bytes

Contents

require 'spec_helper'

describe AngellistApi::Client::Users do
  let(:client) { AngellistApi::Client.new }

  describe "#get_user" do
    it "gets 1/users/<id>" do
      id = "123"
      client.should_receive(:get).with("1/users/#{id}").and_return("success")
      client.get_user(id).should == "success"
    end
  end

  describe '#get_users' do
    it 'gets 1/users/batch?ids=<ids>' do
      ids = [1, 2, 3]
      client.should_receive(:get).
        with('1/users/batch', { :ids => ids.join(',') }).
        and_return('success')
      client.get_users(ids).should == 'success'
    end
  end

  describe "#user_search" do
    it "gets 1/users/search" do
      options = { :some => "options "}
      client.should_receive(:get).with("1/users/search", options).and_return("success")
      client.user_search(options).should == "success"
    end
  end

  describe "#me" do
    it "gets 1/me" do
      client.should_receive(:get).with("1/me").and_return("success")
      client.me.should == "success"
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
angellist_api-1.0.6 spec/unit/lib/angellist_api/client/users_spec.rb
angellist_api-1.0.5 spec/unit/lib/angellist_api/client/users_spec.rb
angellist_api-1.0.4 spec/unit/lib/angellist_api/client/users_spec.rb
angellist_api-1.0.3 spec/unit/lib/angellist_api/client/users_spec.rb
angellist_api-1.0.2 spec/unit/lib/angellist_api/client/users_spec.rb