Remove unnecessary storage of currency

This commit is contained in:
Maikel Linke
2025-01-03 15:32:58 +11:00
committed by Konrad
parent ed926e9e26
commit 917e0ff01a
7 changed files with 6 additions and 26 deletions

View File

@@ -133,7 +133,7 @@ module Spree
before { Spree::Config[:display_currency] = true }
it "shows the currency" do
expect(adjustment.display_amount.to_s).to eq "$10.55 #{Spree::Config[:currency]}"
expect(adjustment.display_amount.to_s).to eq "$10.55 AUD"
end
end
@@ -167,7 +167,7 @@ module Spree
context '#currency' do
it 'returns the globally configured currency' do
expect(adjustment.currency).to eq Spree::Config[:currency]
expect(adjustment.currency).to eq "AUD"
end
end

View File

@@ -516,7 +516,7 @@ RSpec.describe Spree::Order do
before { order.currency = nil }
it "returns the globally configured currency" do
expect(order.currency).to eq Spree::Config[:currency]
expect(order.currency).to eq "AUD"
end
end
end

View File

@@ -292,7 +292,7 @@ RSpec.describe Spree::Variant do
context "#currency" do
it "returns the globally configured currency" do
variant.save!
expect(variant.currency).to eq Spree::Config[:currency]
expect(variant.currency).to eq "AUD"
end
end
@@ -309,7 +309,7 @@ RSpec.describe Spree::Variant do
it "populates cost currency with the default value on save" do
variant.save!
expect(variant.cost_currency).to eq Spree::Config[:currency]
expect(variant.cost_currency).to eq "AUD"
end
end
end