Sha256: 6d53a094841a0a257d36ec7eb1d276c1db2d143fe2540dff34c4e085f42873a6

Contents?: true

Size: 729 Bytes

Versions: 14

Compression:

Stored size: 729 Bytes

Contents

require File.join(File.expand_path(File.dirname(__FILE__)), "..", "spec_helper")

describe BillForward::Client do
	describe '#new' do
		before :all do
			@client = BillForwardTest::TEST_CLIENT
			BillForward::Client.default_client = @client
		end
		it "should find empty results upon looking up non-existent ID" do
			account_id = "nonexist"

			expect{BillForward::Account.get_by_id account_id}.to raise_error(IndexError)
		end
		it "should raise upon bad token" do
			host=@client.host
			token="badtoken"
			dudclient = BillForward::Client.new(
			    :host => host,
			    :api_token => token
				)
			expect{BillForward::Organisation.get_mine(nil,dudclient)}.to raise_error(BillForward::ApiAuthorizationError)
		end
	end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
bill_forward-2.2016.241 spec/functional/client_spec.rb
bill_forward-2.2016.227 spec/functional/client_spec.rb
bill_forward-2.2016.222 spec/functional/client_spec.rb
bill_forward-2.2016.209 spec/functional/client_spec.rb
bill_forward-1.2016.117 spec/functional/client_spec.rb
bill_forward-1.2016.101 spec/functional/client_spec.rb
bill_forward-1.2016.26 spec/functional/client_spec.rb
bill_forward-1.2015.321.1 spec/functional/client_spec.rb
bill_forward-1.2015.321 spec/functional/client_spec.rb
bill_forward-1.2015.299 spec/functional/client_spec.rb
bill_forward-1.2015.217.1 spec/functional/client_spec.rb
bill_forward-1.2015.217 spec/functional/client_spec.rb
bill_forward-1.2015.186 spec/functional/client_spec.rb
bill_forward-1.2015.183 spec/functional/client_spec.rb