Sha256: 88c25a44be4bb1b83a9fbd3c7eda17cd3f7cc9c40854044c30711986a4a162be

Contents?: true

Size: 805 Bytes

Versions: 3

Compression:

Stored size: 805 Bytes

Contents

require 'spec_helper'

describe GrooveHQ::Client::Agents, integration: true do

  let(:client) { GrooveHQ::Client.new }
  let(:email) { "fodojyko@gmail.com" }

  describe "#agent" do

    let(:response) { client.agent(email) }

    it "successfully gets agent" do
      expect(response.data).to have_attributes(email: String)
    end

    it "gets the right agent info" do
      expect(response.data).to have_attributes(email: email, first_name: "Testagent")
    end

  end

  describe "#agents" do

    let(:response) { client.agents }

    it "successfully gets agents" do
      expect(response).to be_instance_of GrooveHQ::ResourceCollection
    end

    it "gets the right agents info" do
      expect(response.first.data).to have_attributes(email: email, first_name: "Testagent")
    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
groovehq-1.0.7 spec/groovehq/integration/agents_spec.rb
groovehq-1.0.6 spec/groovehq/integration/agents_spec.rb
groovehq-1.0.5 spec/groovehq/integration/agents_spec.rb