Sha256: 90b717ce79f5e3f809d7ba56cf18d6df24f0e6916d735cd5f0d0aee6b6590ecf

Contents?: true

Size: 818 Bytes

Versions: 14

Compression:

Stored size: 818 Bytes

Contents

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

describe BillForward::UnitOfMeasure do
	before :all do
		@client = BillForwardTest::TEST_CLIENT
		BillForward::Client.default_client = @client
	end
	describe '::create' do
		it 'creates a UnitOfMeasure' do
			uom_1_name = 'CPU'
			created_uom_1 = nil
			begin
				created_uom_1 = BillForward::UnitOfMeasure.get_by_id uom_1_name
			rescue IndexError=>e
				# create a unit of measure
				unit_of_measure_1 = BillForward::UnitOfMeasure.new({
					'name' => uom_1_name,
					'displayedAs' => 'Cycles',
					'roundingScheme' => 'UP',
					})
				created_uom_1 = BillForward::UnitOfMeasure.create(unit_of_measure_1)
			end
			
			expect(created_uom_1['@type']).to eq(BillForward::UnitOfMeasure.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/unit_of_measure_spec.rb
bill_forward-2.2016.227 spec/functional/bad_citizen/unit_of_measure_spec.rb
bill_forward-2.2016.222 spec/functional/bad_citizen/unit_of_measure_spec.rb
bill_forward-2.2016.209 spec/functional/bad_citizen/unit_of_measure_spec.rb
bill_forward-1.2016.117 spec/functional/bad_citizen/unit_of_measure_spec.rb
bill_forward-1.2016.101 spec/functional/bad_citizen/unit_of_measure_spec.rb
bill_forward-1.2016.26 spec/functional/bad_citizen/unit_of_measure_spec.rb
bill_forward-1.2015.321.1 spec/functional/bad_citizen/unit_of_measure_spec.rb
bill_forward-1.2015.321 spec/functional/bad_citizen/unit_of_measure_spec.rb
bill_forward-1.2015.299 spec/functional/bad_citizen/unit_of_measure_spec.rb
bill_forward-1.2015.217.1 spec/functional/bad_citizen/unit_of_measure_spec.rb
bill_forward-1.2015.217 spec/functional/bad_citizen/unit_of_measure_spec.rb
bill_forward-1.2015.186 spec/functional/bad_citizen/unit_of_measure_spec.rb
bill_forward-1.2015.183 spec/functional/bad_citizen/unit_of_measure_spec.rb