summaryrefslogtreecommitdiff
path: root/users/test
diff options
context:
space:
mode:
Diffstat (limited to 'users/test')
-rw-r--r--users/test/functional/users_controller_test.rb8
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