diff --git a/core/app/models/spree/tax_rate.rb b/core/app/models/spree/tax_rate.rb index 8cec5e00fa7..39b6ef8aaab 100644 --- a/core/app/models/spree/tax_rate.rb +++ b/core/app/models/spree/tax_rate.rb @@ -113,6 +113,10 @@ def adjustment_label(amount) ) end + def display_amount + amount_for_adjustment_label + end + private def amount_for_adjustment_label diff --git a/core/spec/models/spree/tax_rate_spec.rb b/core/spec/models/spree/tax_rate_spec.rb index 24b1e0f0908..c9550b2f633 100644 --- a/core/spec/models/spree/tax_rate_spec.rb +++ b/core/spec/models/spree/tax_rate_spec.rb @@ -256,4 +256,10 @@ end end end + + describe "#display_amount" do + subject(:rate) { create(:tax_rate, amount: 0.1).display_amount } + + it { is_expected.to eq("10.0%") } + end end