Sha256: 59a6834d0e2ddd187fb0798c62801e4f2d6524029bd00f544e44b78053edd922

Contents?: true

Size: 868 Bytes

Versions: 13

Compression:

Stored size: 868 Bytes

Contents

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

describe BillForward::Organisation do
	before :all do
		@client = BillForwardTest::TEST_CLIENT
		BillForward::Client.default_client = @client
	end
	describe '::get_all' do
		it 'raises permissions error' do
			# 'admin' privilege is insufficient to see other organisations
			expect{BillForward::Organisation::get_all}.to raise_error(BillForward::ApiError, /400|500/)
			# Expected error:
			# ====
	    	# 500 API Error.
	    	# Type: PermissionsError
	    	# Message: Access is denied
	    	# ====
		end
	end
	describe '::get_mine' do
		it "should find organisations" do
			organisations = BillForward::Organisation.get_mine
			organisations_first = organisations.first

			expect(organisations_first['@type']).to eq(BillForward::Organisation.resource_path.entity_name)
		end
	end
end

Version data entries

13 entries across 13 versions & 1 rubygems

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