X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/d102c9aaf478a4bad52a72b1b72470ba35ba464e..4d47cff5e1d359fa27c5c46d2706faae39a3eacc:/test/integration/user_terms_seen_test.rb diff --git a/test/integration/user_terms_seen_test.rb b/test/integration/user_terms_seen_test.rb index 32fdba0b2..f7d3f2e54 100644 --- a/test/integration/user_terms_seen_test.rb +++ b/test/integration/user_terms_seen_test.rb @@ -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 %s", :auth => Base64.encode64("#{user}:#{pass}")) } end end