diff options
author | Azul <azul@leap.se> | 2014-04-04 15:40:22 +0200 |
---|---|---|
committer | Azul <azul@leap.se> | 2014-04-04 15:40:22 +0200 |
commit | aeb5d8cf8dc6329906f14bf4595a229e002691c1 (patch) | |
tree | 000f3137aeb711a4008dd58f930f9c6b7d9d0e65 /users/test/functional | |
parent | 7b4f9ad334ec702449fdc683ea8fc312e06b2bd9 (diff) |
redirect home when logged in visits /signup (#5446)
Diffstat (limited to 'users/test/functional')
-rw-r--r-- | users/test/functional/users_controller_test.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/users/test/functional/users_controller_test.rb b/users/test/functional/users_controller_test.rb index 57ae94d..0713836 100644 --- a/users/test/functional/users_controller_test.rb +++ b/users/test/functional/users_controller_test.rb @@ -4,11 +4,17 @@ class UsersControllerTest < ActionController::TestCase test "should get new" do get :new - assert_equal User, assigns(:user).class assert_response :success end + test "new should redirect logged in users" do + login + get :new + assert_response :redirect + assert_redirected_to home_path + end + test "failed show without login" do user = find_record :user get :show, :id => user.id |