]> source.dussan.org Git - redmine.git/commitdiff
merged r17362 from trunk to 3.4-stable (#28693).
authorGo MAEDA <maeda@farend.jp>
Sun, 3 Jun 2018 03:45:06 +0000 (03:45 +0000)
committerGo MAEDA <maeda@farend.jp>
Sun, 3 Jun 2018 03:45:06 +0000 (03:45 +0000)
git-svn-id: http://svn.redmine.org/redmine/branches/3.4-stable@17363 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/projects_controller_test.rb

index f243af92c8285bad4612a3c23945611e12e2b46e..20dfaf474035a380fac614722c43a3f02d97dd71 100644 (file)
@@ -663,18 +663,19 @@ class ProjectsControllerTest < Redmine::ControllerTest
 
   def test_settings_should_show_tabs_depending_on_permission
     @request.session[:user_id] = 3
-    role = User.find(3).roles.first
+    project = Project.find(1)
+    role = User.find(3).roles_for_project(project).first
 
     role.permissions = []
     role.save
     get :settings, :params => {
-      :id => 'ecookbook'
+      :id => project.id
     }
     assert_response 403
 
     role.add_permission! :manage_repository, :manage_boards, :manage_project_activities
     get :settings, :params => {
-      :id => 'ecookbook'
+      :id => project.id
     }
     assert_response :success
     assert_select 'a[id^=tab-]', 3