mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-18 13:38:24 -04:00
Updated the foreign exchange link to use configured currency.
This commit is contained in:
@@ -17,7 +17,8 @@ module ApplicationHelper
|
||||
|
||||
def forex_link(price)
|
||||
pid = price_in_dollars(price)
|
||||
link = "http://www.wolframalpha.com/input/?i=#{pid}+aud"
|
||||
currency = Growstuff::Application.config.currency
|
||||
link = "http://www.wolframalpha.com/input/?i=#{pid}+#{currency}"
|
||||
return link_to "See exchange rates",
|
||||
link,
|
||||
:target => "_blank"
|
||||
|
||||
@@ -24,7 +24,8 @@ describe 'shop/index.html.haml', :type => "view" do
|
||||
end
|
||||
|
||||
it 'should contain an exchange rate link' do
|
||||
assert_select("a[href=http://www.wolframalpha.com/input/?i=9.99+aud]")
|
||||
currency = Growstuff::Application.config.currency
|
||||
assert_select("a[href=http://www.wolframalpha.com/input/?i=9.99+#{currency}]")
|
||||
end
|
||||
|
||||
it 'shows recommended price for products that have it' do
|
||||
|
||||
Reference in New Issue
Block a user