summaryrefslogtreecommitdiffstats
path: root/test/functional/trackers_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-11-20 14:17:43 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-11-20 14:17:43 +0000
commit053adaef52d795e5a3ef134381dd378e40856775 (patch)
tree3d467d8e9ed996a4f1495ac3c2443a1517f9451d /test/functional/trackers_controller_test.rb
parent8b5b928b9236f09f029915d755bde23b3e8fabb5 (diff)
downloadredmine-053adaef52d795e5a3ef134381dd378e40856775.tar.gz
redmine-053adaef52d795e5a3ef134381dd378e40856775.zip
Adds API response to /trackers to get the list of all available trackers (#7181).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7877 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/trackers_controller_test.rb')
-rw-r--r--test/functional/trackers_controller_test.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/functional/trackers_controller_test.rb b/test/functional/trackers_controller_test.rb
index 63498303f..4d9b228f1 100644
--- a/test/functional/trackers_controller_test.rb
+++ b/test/functional/trackers_controller_test.rb
@@ -37,6 +37,18 @@ class TrackersControllerTest < 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%2Ftrackers'
+ end
+
+ def test_index_by_user_should_respond_with_406
+ @request.session[:user_id] = 2
+ get :index
+ assert_response 406
+ end
def test_get_new
get :new