diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index a2e14987b..fcd8e1cdc 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -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" diff --git a/spec/views/shop/index_spec.rb b/spec/views/shop/index_spec.rb index 67dcdb081..ced2fee99 100644 --- a/spec/views/shop/index_spec.rb +++ b/spec/views/shop/index_spec.rb @@ -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