diff options
author | Jean-Baptiste Barth <jeanbaptiste.barth@gmail.com> | 2010-08-10 23:07:44 +0000 |
---|---|---|
committer | Jean-Baptiste Barth <jeanbaptiste.barth@gmail.com> | 2010-08-10 23:07:44 +0000 |
commit | e43f9fc21edc0a7b3451f64204c3399eab359529 (patch) | |
tree | 06c1fa6cd6bc240068a439e2dde62e0e5ef03ccb /test/functional | |
parent | 0cfa757db0bed740e6641e245849a72a6f4632a8 (diff) | |
download | redmine-e43f9fc21edc0a7b3451f64204c3399eab359529.tar.gz redmine-e43f9fc21edc0a7b3451f64204c3399eab359529.zip |
Show projects depending on their visibility in user's profile. #6100
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3935 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/users_controller_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/functional/users_controller_test.rb b/test/functional/users_controller_test.rb index d178f8f85..640ce8685 100644 --- a/test/functional/users_controller_test.rb +++ b/test/functional/users_controller_test.rb @@ -96,6 +96,16 @@ class UsersControllerTest < ActionController::TestCase assert_response 200 assert_not_nil assigns(:user) end + + def test_show_displays_memberships_based_on_project_visibility + @request.session[:user_id] = 1 + get :show, :id => 2 + assert_response :success + memberships = assigns(:memberships) + assert_not_nil memberships + project_ids = memberships.map(&:project_id) + assert project_ids.include?(2) #private project admin can see + end def test_edit ActionMailer::Base.deliveries.clear |