diff --git a/backend/spec/features/admin/orders/adjustments_spec.rb b/backend/spec/features/admin/orders/adjustments_spec.rb index 5bf85dd3ce2..57356ed9776 100644 --- a/backend/spec/features/admin/orders/adjustments_spec.rb +++ b/backend/spec/features/admin/orders/adjustments_spec.rb @@ -37,7 +37,7 @@ context "admin managing adjustments" do it "should display the correct values for existing order adjustments" do within first('table tr', text: 'Tax') do - expect(column_text(2)).to match(/TaxCategory - \d+ 20\.000%/) + expect(column_text(2)).to match(/TaxCategory - \d+ 20\.0%/) expect(column_text(3)).to eq("$2.00") end end diff --git a/core/app/models/spree/tax_rate.rb b/core/app/models/spree/tax_rate.rb index 957cc12c6da..cf8ac8b097e 100644 --- a/core/app/models/spree/tax_rate.rb +++ b/core/app/models/spree/tax_rate.rb @@ -118,7 +118,8 @@ def adjustment_label(amount) def amount_for_adjustment_label ActiveSupport::NumberHelper::NumberToPercentageConverter.convert( amount * 100, - locale: I18n.locale + locale: I18n.locale, + precision: nil ) end diff --git a/core/spec/models/spree/tax_calculator/default_spec.rb b/core/spec/models/spree/tax_calculator/default_spec.rb index a3678e79e9f..4800f45dce2 100644 --- a/core/spec/models/spree/tax_calculator/default_spec.rb +++ b/core/spec/models/spree/tax_calculator/default_spec.rb @@ -46,7 +46,7 @@ expect(line_item_tax.amount).to eq 1 expect(line_item_tax.included_in_price).to be false expect(line_item_tax.tax_rate).to eq book_tax_rate - expect(line_item_tax.label).to eq "New York Sales Tax 5.000%" + expect(line_item_tax.label).to eq "New York Sales Tax 5.0%" end it "has tax information for the shipments" do