]> git.openstreetmap.org Git - rails.git/blobdiff - test/integration/user_terms_seen_test.rb
Use with_locale for the copyright page
[rails.git] / test / integration / user_terms_seen_test.rb
index 32fdba0b2c09516f26209de4400863213ef344b4..f7d3f2e54ebd912c28a901edf21aacc395b4074e 100644 (file)
@@ -1,10 +1,6 @@
 require "test_helper"
 
 class UserTermsSeenTest < ActionDispatch::IntegrationTest
-  def setup
-    stub_hostip_requests
-  end
-
   def test_api_blocked
     user = create(:user, :terms_seen => false, :terms_agreed => nil)
 
@@ -26,7 +22,7 @@ class UserTermsSeenTest < ActionDispatch::IntegrationTest
     get "/login"
     follow_redirect!
     assert_response :success
-    assert_template "users/login"
+    assert_template "sessions/new"
     post "/login", :params => { :username => user.email, :password => "test", :referer => "/diary/new" }
     assert_response :redirect
     # but now we need to look at the terms
@@ -51,7 +47,7 @@ class UserTermsSeenTest < ActionDispatch::IntegrationTest
     get "/login"
     follow_redirect!
     assert_response :success
-    assert_template "users/login"
+    assert_template "sessions/new"
     post "/login", :params => { :username => user.email, :password => "test", :referer => "/diary/new" }
     assert_response :redirect
     # but now we need to look at the terms
@@ -68,6 +64,6 @@ class UserTermsSeenTest < ActionDispatch::IntegrationTest
   private
 
   def auth_header(user, pass)
-    { "HTTP_AUTHORIZATION" => format("Basic %{auth}", :auth => Base64.encode64("#{user}:#{pass}")) }
+    { "HTTP_AUTHORIZATION" => format("Basic %<auth>s", :auth => Base64.encode64("#{user}:#{pass}")) }
   end
 end