]> git.openstreetmap.org Git - rails.git/commitdiff
Index page no longer redirects when there's no issues.
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 29 Nov 2017 17:37:29 +0000 (17:37 +0000)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 29 Nov 2017 17:37:29 +0000 (17:37 +0000)
test/controllers/issues_controller_test.rb

index c57ee53a3aeba4c6718a73e213b8810ec9473f25..3a38ea812ce240af4165592b3c5cc44f99d2057b 100644 (file)
@@ -21,16 +21,12 @@ class IssuesControllerTest < ActionController::TestCase
     # Access issues_path by admin
     session[:user] = create(:administrator_user).id
     get :index
     # Access issues_path by admin
     session[:user] = create(:administrator_user).id
     get :index
-    # this is redirected because there are no issues?!
-    assert_response :redirect
-    assert_redirected_to issues_path
+    assert_response :success
 
     # Access issues_path by moderator
     session[:user] = create(:moderator_user).id
     get :index
 
     # Access issues_path by moderator
     session[:user] = create(:moderator_user).id
     get :index
-    # this is redirected because there are no issues?!
-    assert_response :redirect
-    assert_redirected_to issues_path
+    assert_response :success
   end
 
   def test_new_issue_without_login
   end
 
   def test_new_issue_without_login