summaryrefslogtreecommitdiffstats
path: root/test/functional/issue_statuses_controller_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/issue_statuses_controller_test.rb')
-rw-r--r--test/functional/issue_statuses_controller_test.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/functional/issue_statuses_controller_test.rb b/test/functional/issue_statuses_controller_test.rb
index c03f30866..d49232605 100644
--- a/test/functional/issue_statuses_controller_test.rb
+++ b/test/functional/issue_statuses_controller_test.rb
@@ -21,6 +21,18 @@ class IssueStatusesControllerTest < ActionController::TestCase
assert_response :success
assert_template 'index'
end
+
+ def test_index_by_anonymous_should_redirect_to_login_form
+ @request.session[:user_id] = nil
+ get :index
+ assert_redirected_to '/login?back_url=http%3A%2F%2Ftest.host%2Fissue_statuses'
+ end
+
+ def test_index_by_user_should_respond_with_406
+ @request.session[:user_id] = 2
+ get :index
+ assert_response 406
+ end
def test_new
get :new