This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Spec adjustments after method was removed.

  • Loading branch information...
saulius committed Nov 30, 2012
1 parent 6229fb2 commit e0cbb5c283383266e371ecc159015d9ff2a0fb43
Showing with 5 additions and 5 deletions.
  1. +5 −5 spec/models/commodity_spec.rb
@@ -84,9 +84,9 @@
end
describe 'third country duty rate fetch' do
- let(:measure1) { attributes_for :measure, :third_country, measure_type_description: 'abc', additional_code: { code: '123' } }
- let(:measure2) { attributes_for :measure, :third_country, measure_type_description: 'def', additional_code: { code: '456' } }
- let(:measure3) { attributes_for :measure, measure_type_id: '911', measure_type_description: 'xyz' }
+ let(:measure1) { attributes_for :measure, :third_country, measure_type_description: 'abc', measure_components: [duty_amount: "10", duty_expression_id: "1"], additional_code: { code: '123' } }
+ let(:measure2) { attributes_for :measure, :third_country, measure_type_description: 'def', measure_components: [duty_amount: "20", duty_expression_id: "1"], additional_code: { code: '456' } }
+ let(:measure3) { attributes_for :measure, measure_type_id: '911', measure_type_description: 'xyz', geographical_area: attributes_for(:geographical_area) }
let(:measures) { [measure1, measure2, measure3] }
let(:commodity) { Commodity.new(attributes_for :commodity, import_measures: measures) }
@@ -101,9 +101,9 @@
end
end
- describe '#third_country_duty' do
+ describe '#third_country_duty_rate' do
it 'sorts commodities by additional code and picks the last one' do
- commodity.third_country_duty.measure_type_description.should eq 'def'
+ commodity.third_country_duty_rate.should eq '20.00 %'
end
end
end

0 comments on commit e0cbb5c

Please sign in to comment.