Skip to content

Commit

Permalink
Fix specs failing after Money 6.18.0 release
Browse files Browse the repository at this point in the history
The release includes RubyMoney/money#1026
which replaces the html entity for EURO with its symbol.

(cherry picked from commit 2b88945)
  • Loading branch information
spaghetticode committed May 8, 2024
1 parent db69bcb commit 83887fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/spec/lib/spree/money_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,13 @@
it "formats as HTML if asked (nicely) to" do
money = Spree::Money.new(10, format: '%n %u')
# The HTML'ified version of "10.00 €"
expect(money.to_html).to eq("<span class=\"money-whole\">10</span><span class=\"money-decimal-mark\">.</span><span class=\"money-decimal\">00</span> <span class=\"money-currency-symbol\">&#x20AC;</span>")
expect(money.to_html).to eq("<span class=\"money-whole\">10</span><span class=\"money-decimal-mark\">.</span><span class=\"money-decimal\">00</span> <span class=\"money-currency-symbol\"></span>")
end

it "formats as HTML with currency" do
money = Spree::Money.new(10, format: '%n %u', with_currency: true)
# The HTML'ified version of "10.00 €"
expect(money.to_html).to eq("<span class=\"money-whole\">10</span><span class=\"money-decimal-mark\">.</span><span class=\"money-decimal\">00</span> <span class=\"money-currency-symbol\">&#x20AC;</span> <span class=\"money-currency\">EUR</span>")
expect(money.to_html).to eq("<span class=\"money-whole\">10</span><span class=\"money-decimal-mark\">.</span><span class=\"money-decimal\">00</span> <span class=\"money-currency-symbol\"></span> <span class=\"money-currency\">EUR</span>")
end
end

Expand Down

0 comments on commit 83887fd

Please sign in to comment.