Sha256: a28ae5f284bd863d13914ef93a010a94c6b6e8c5cdb3b4a1a9991777f343b3a7

Contents?: true

Size: 929 Bytes

Versions: 14

Compression:

Stored size: 929 Bytes

Contents

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

describe BillForward::Product do
	before :all do
		@client = BillForwardTest::TEST_CLIENT
		BillForward::Client.default_client = @client
	end
	describe '::create' do
		it 'creates a Product' do
			product_name = 'Monthly recurring'
			created_product = nil
			begin
				created_product = BillForward::Product.get_by_id product_name
			rescue IndexError=>e
				# create a product
				product = BillForward::Product.new({
					'productType' => 'recurring',
					'state' => 'prod',
					'name' => product_name,
					'description' => 'Purchaseables to which customer has a non-renewing, monthly entitlement',
					'durationPeriod' => 'months',
					'duration' => 1,
					})
				created_product = BillForward::Product::create(product)
			end
			expect(created_product['@type']).to eq(BillForward::Product.resource_path.entity_name)
		end
	end
end

Version data entries

14 entries across 14 versions & 1 rubygems

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