Sha256: 17f82304f9dfba5b7f1b03c0cbfaf4342dc18317fa52844e323cd7af8a9c83f3
Contents?: true
Size: 750 Bytes
Versions: 5
Compression:
Stored size: 750 Bytes
Contents
require File.expand_path('../../../spec_helper', __FILE__) describe AvaTax::Client do before do @client = AvaTax::Client.new() end describe ".accounts" do before do stub_get("/api/v2/accounts"). to_return(:body => fixture("accounts.json"), :headers => {:content_type => "application/json; charset=utf-8"}) end it "should get the correct resource" do @client.query_accounts() expect(a_get("/api/v2/accounts")).to have_been_made end it "should return an array of accounts" do accounts = @client.query_accounts expect(accounts).to be_a Object expect(accounts['value'].first['id']).to equal 200000251 expect(accounts.value.first.id).to equal 200000251 end end end
Version data entries
5 entries across 5 versions & 1 rubygems