X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/6baccfaddd190d730b626204e9cf81c2504995bf..703663c4a2f1db3b0a0dd070e653bbccd7d36c1e:/test/integration/short_link_test.rb diff --git a/test/integration/short_link_test.rb b/test/integration/short_link_test.rb index 91f939a52..e99b290b9 100644 --- a/test/integration/short_link_test.rb +++ b/test/integration/short_link_test.rb @@ -6,7 +6,7 @@ class ShortLinkTest < ActionController::IntegrationTest # kept in the redirect. def test_short_link_params assert_short_link_redirect('1N8H@P_5W') - assert_short_link_redirect('euu4oTas==') + assert_short_link_redirect(ShortLink::encode(-0.107846, 51.50771, 18)) end ## @@ -16,20 +16,20 @@ class ShortLinkTest < ActionController::IntegrationTest # test without marker get '/go/' + short_link - assert_redirected_to :controller => 'site', :action => 'index', :lat => lat, :lon => lon, :zoom => zoom + assert_redirected_to :controller => 'site', :action => 'index', :lat => lat.to_s, :lon => lon.to_s, :zoom => zoom.to_s # test with marker get '/go/' + short_link + "?m" - assert_redirected_to :controller => 'site', :action => 'index', :mlat => lat, :mlon => lon, :zoom => zoom + assert_redirected_to :controller => 'site', :action => 'index', :mlat => lat.to_s, :mlon => lon.to_s, :zoom => zoom.to_s # test with layers and a marker get '/go/' + short_link + "?m&layers=B000FTF" - assert_redirected_to :controller => 'site', :action => 'index', :mlat => lat, :mlon => lon, :zoom => zoom, :layers => "B000FTF" + assert_redirected_to :controller => 'site', :action => 'index', :mlat => lat.to_s, :mlon => lon.to_s, :zoom => zoom.to_s, :layers => "B000FTF" get '/go/' + short_link + "?layers=B000FTF&m" - assert_redirected_to :controller => 'site', :action => 'index', :mlat => lat, :mlon => lon, :zoom => zoom, :layers => "B000FTF" + assert_redirected_to :controller => 'site', :action => 'index', :mlat => lat.to_s, :mlon => lon.to_s, :zoom => zoom.to_s, :layers => "B000FTF" # test with some random query parameters we haven't even implemented yet get '/go/' + short_link + "?foobar=yes" - assert_redirected_to :controller => 'site', :action => 'index', :lat => lat, :lon => lon, :zoom => zoom, :foobar => "yes" + assert_redirected_to :controller => 'site', :action => 'index', :lat => lat.to_s, :lon => lon.to_s, :zoom => zoom.to_s, :foobar => "yes" end end