summaryrefslogtreecommitdiff
path: root/users/test/functional/sessions_controller_test.rb
diff options
context:
space:
mode:
authorazul <azul@riseup.net>2013-12-17 07:43:28 -0800
committerazul <azul@riseup.net>2013-12-17 07:43:28 -0800
commit3d0b0a2b871f08222dc3354afa0747239478d49c (patch)
tree065c3245739e7d574876732fc752efe5ccb12350 /users/test/functional/sessions_controller_test.rb
parente2638a3a91cb2c6a426f856c4d1919be1a852b6a (diff)
parent91aea91d7091b740630551ec17d0274236545f4c (diff)
Merge pull request #124 from jessib/feature/bugfix4756_login_crash
Feature/bugfix4756 login crash
Diffstat (limited to 'users/test/functional/sessions_controller_test.rb')
-rw-r--r--users/test/functional/sessions_controller_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/users/test/functional/sessions_controller_test.rb b/users/test/functional/sessions_controller_test.rb
index 28143da..8b49005 100644
--- a/users/test/functional/sessions_controller_test.rb
+++ b/users/test/functional/sessions_controller_test.rb
@@ -17,6 +17,13 @@ class SessionsControllerTest < ActionController::TestCase
assert_template "sessions/new"
end
+ test "redirect to root_url if logged in" do
+ login
+ get :new
+ assert_response :redirect
+ assert_redirected_to root_url
+ end
+
test "renders json" do
get :new, :format => :json
assert_response :success