]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/users_controller_test.rb
Fix redirect to terms path when not logged in
[rails.git] / test / controllers / users_controller_test.rb
index a73e48211f45dcc5a88533f8e43a19b3f8b8940a..10c5c3bee674e626585f7ba8632ff42455cc2afd 100644 (file)
@@ -414,6 +414,12 @@ class UsersControllerTest < ActionDispatch::IntegrationTest
     assert_redirected_to :action => :terms, :referer => "/user/#{ERB::Util.u(user.display_name)}/account"
   end
 
+  def test_terms_not_logged_in
+    get user_terms_path
+
+    assert_redirected_to login_path(:referer => "/user/terms")
+  end
+
   def test_go_public
     user = create(:user, :data_public => false)
     session_for(user)