Sha256: 583f4cd4134f67dd0ab67df9d4581d0eac12e92d34af9ee61838a37b8b7e2940

Contents?: true

Size: 736 Bytes

Versions: 15

Compression:

Stored size: 736 Bytes

Contents

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

describe BillForward::Invoice do
	before :all do
		@client = BillForwardTest::TEST_CLIENT
		BillForward::Client.default_client = @client

		# Existing invoice supplied from test constants, as we cannot create invoices ourselves
		@invoice_id = BillForwardTest::USUAL_INVOICE_ID
	end
	subject (:invoice_id) { @invoice_id }
	describe '::get_by_id' do
		context 'where invoice exists' do
			it "gets the invoice" do
	            invoice = BillForward::Invoice.get_by_id invoice_id

	            expect(invoice.id).to eq(invoice_id)
	            expect(invoice['@type']).to eq(BillForward::Invoice.resource_path.entity_name)
			end
		end
	end
end

Version data entries

15 entries across 15 versions & 1 rubygems

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