-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #684 from trade-tariff/HOTT-3162-customs-union-quotas
HOTT-3162: Support customs union quotas
- Loading branch information
Showing
7 changed files
with
53 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module DutyOptions | ||
module Quota | ||
class CustomsUnion < DutyOptions::Quota::Base | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
RSpec.describe DutyOptions::Quota::CustomsUnion, :user_session do | ||
include_context 'with a standard duty option setup', :customs_union | ||
|
||
describe '#call' do | ||
let(:expected_table) do | ||
{ | ||
footnote: I18n.t('measure_type_footnotes.147'), | ||
warning_text: nil, | ||
values: [ | ||
['Valuation for import', 'Value of goods + freight + insurance costs', '£1,200.00'], | ||
['Import duty<br><span class="govuk-green govuk-body-xs"> Customs Union Quota (UK)</span>', '8.00% * £1200.00', '£96.00'], | ||
['<strong>Duty Total</strong>', nil, '<strong>£96.00</strong>'], | ||
], | ||
value: 96, | ||
measure_sid: measure.id, | ||
source: 'uk', | ||
type: 'customs_union', | ||
category: :quota, | ||
priority: 3, | ||
scheme_code: 'albania', | ||
order_number: '058048', | ||
geographical_area_description: nil, | ||
} | ||
end | ||
|
||
it { expect(service.call.attributes.deep_symbolize_keys).to eq(expected_table) } | ||
end | ||
|
||
it_behaves_like 'a duty option that excludes safeguard additional duties' | ||
end |