diff options
Diffstat (limited to 'test/functional/users_controller_test.rb')
-rw-r--r-- | test/functional/users_controller_test.rb | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/test/functional/users_controller_test.rb b/test/functional/users_controller_test.rb index 78b6689fc..d9a46bd60 100644 --- a/test/functional/users_controller_test.rb +++ b/test/functional/users_controller_test.rb @@ -106,12 +106,6 @@ class UsersControllerTest < ActionController::TestCase assert_response 404 end - def test_show_should_not_reveal_users_with_no_visible_activity_or_project - @request.session[:user_id] = nil - get :show, :id => 9 - assert_response 404 - end - def test_show_inactive_by_admin @request.session[:user_id] = 1 get :show, :id => 5 @@ -119,6 +113,15 @@ class UsersControllerTest < ActionController::TestCase assert_not_nil assigns(:user) end + def test_show_user_who_is_not_visible_should_return_404 + Role.anonymous.update! :users_visibility => 'members_of_visible_projects' + user = User.generate! + + @request.session[:user_id] = nil + get :show, :id => user.id + assert_response 404 + end + def test_show_displays_memberships_based_on_project_visibility @request.session[:user_id] = 1 get :show, :id => 2 |