summaryrefslogtreecommitdiffstats
path: root/test/functional
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-10-09 06:36:58 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-10-09 06:36:58 +0000
commit46b877296a71bee4f5c6cf4d62a5bfa56476b848 (patch)
tree64ecb561216e84217e75424e333c06cec87d1d41 /test/functional
parentd690cff576c3083ca75b7f3b7c177b0c65e8e0ff (diff)
downloadredmine-46b877296a71bee4f5c6cf4d62a5bfa56476b848.tar.gz
redmine-46b877296a71bee4f5c6cf4d62a5bfa56476b848.zip
Merged r14619 (#20282).
git-svn-id: http://svn.redmine.org/redmine/branches/3.1-stable@14649 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/projects_controller_test.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/functional/projects_controller_test.rb b/test/functional/projects_controller_test.rb
index 2efb98ccd..e4e74521d 100644
--- a/test/functional/projects_controller_test.rb
+++ b/test/functional/projects_controller_test.rb
@@ -486,6 +486,17 @@ class ProjectsControllerTest < ActionController::TestCase
assert_equal 'eCookbook', Project.find(1).name
end
+ def test_update_child_project_without_parent_permission_should_not_show_validation_error
+ child = Project.generate_with_parent!
+ user = User.generate!
+ User.add_to_project(user, child, Role.generate!(:permissions => [:edit_project]))
+ @request.session[:user_id] = user.id
+
+ post :update, :id => child.id, :project => {:name => 'Updated'}
+ assert_response 302
+ assert_match /Successful update/, flash[:notice]
+ end
+
def test_modules
@request.session[:user_id] = 2
Project.find(1).enabled_module_names = ['issue_tracking', 'news']