Updated the foreign exchange link to use configured currency.

This commit is contained in:
Lucy
2013-07-03 13:04:43 +01:00
parent 67c457dfcd
commit 5c92bb04d3
2 changed files with 4 additions and 2 deletions

View File

@@ -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"

View File

@@ -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