]> git.openstreetmap.org Git - rails.git/blobdiff - test/integration/user_terms_seen_test.rb
Reduce duplication in the oauth tests
[rails.git] / test / integration / user_terms_seen_test.rb
index a00ad39d57891b7a652f80a657c1a86273e53ac1..678492f3c75179f9194b9e5b2d79ea40d37fdf8b 100644 (file)
@@ -64,13 +64,15 @@ class UserTermsSeenTest < ActionDispatch::IntegrationTest
       # back to the terms page.
       get "/traces/mine"
       assert_redirected_to "controller" => "user", "action" => "terms", :referer => "/traces/mine"
+      get "/traces/mine", :referer => "/test"
+      assert_redirected_to "controller" => "user", "action" => "terms", :referer => "/test"
     end
   end
 
   private
 
   def auth_header(user, pass)
-    { "HTTP_AUTHORIZATION" => "Basic %s" % Base64.encode64("#{user}:#{pass}") }
+    { "HTTP_AUTHORIZATION" => format("Basic %s", Base64.encode64("#{user}:#{pass}")) }
   end
 
   def with_terms_seen(value)