Sha256: 1801ffdad1da8bb2e786d5499f9e05350f948fe3f0b8de22371c2c45ee717750

Contents?: true

Size: 672 Bytes

Versions: 5

Compression:

Stored size: 672 Bytes

Contents

require 'spec_helper'

describe Validic::REST::Organizations do
  let(:client) { Validic::Client.new }

  describe "#get_organization" do
    before do
      stub_get('/organizations/1.json')
        .with(query: { access_token: '1' })
        .to_return(body: fixture('organizations.json'),
      headers: { content_type: 'application/json; charset=utf-8' })
      @org = client.get_organization
    end
    it 'returns an organization object' do
      expect(@org).to be_a Validic::Response
    end
    it 'creates the correct url' do
      expect(a_get('/organizations/1.json')
        .with(query: { access_token: '1' }))
        .to have_been_made
    end
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
validic-0.6.1 spec/validic/rest/organizations_spec.rb
validic-0.6.0 spec/validic/rest/organizations_spec.rb
validic-0.5.1 spec/validic/rest/organizations_spec.rb
validic-0.5.0 spec/validic/rest/organizations_spec.rb
validic-0.4.1 spec/validic/rest/organizations_spec.rb