diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2018-12-16 16:28:22 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2018-12-16 16:28:22 +0000 |
commit | 2fdbcd35dd8cc2f6b98340825a57afd24ff89670 (patch) | |
tree | bf05ccb4c0ad1109229cea2b5309fab4c27f8e51 /test/functional/project_enumerations_controller_test.rb | |
parent | 537f162f27d91ad99fadd4be74c878adf33f0583 (diff) | |
download | redmine-2fdbcd35dd8cc2f6b98340825a57afd24ff89670.tar.gz redmine-2fdbcd35dd8cc2f6b98340825a57afd24ff89670.zip |
Adds a permission to log time for another user (#3848).
Patch by Marius BALTEANU.
git-svn-id: http://svn.redmine.org/redmine/trunk@17755 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/project_enumerations_controller_test.rb')
-rw-r--r-- | test/functional/project_enumerations_controller_test.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/functional/project_enumerations_controller_test.rb b/test/functional/project_enumerations_controller_test.rb index 2d87b13a7..3fa579a3d 100644 --- a/test/functional/project_enumerations_controller_test.rb +++ b/test/functional/project_enumerations_controller_test.rb @@ -143,8 +143,8 @@ class ProjectEnumerationsControllerTest < Redmine::ControllerTest :enumerations => { "9"=> { "parent_id"=>"9", "custom_field_values"=> { - "7" => "1"}, "active"=>"0"} # Design, De-activate - + "7" => "1"}, "active"=>"0"} # Design, De-activate + } } assert_response :redirect @@ -163,10 +163,11 @@ class ProjectEnumerationsControllerTest < Redmine::ControllerTest # TODO: Need to cause an exception on create but these tests # aren't setup for mocking. Just create a record now so the # second one is a dupicate + user = User.find(1) parent = TimeEntryActivity.find(9) TimeEntryActivity.create!({:name => parent.name, :project_id => 1, :position => parent.position, :active => true, :parent_id => 9}) - TimeEntry.create!({:project_id => 1, :hours => 1.0, :user => User.find(1), + TimeEntry.create!({:project_id => 1, :hours => 1.0, :user => user, :author => user, :issue_id => 3, :activity_id => 10, :spent_on => '2009-01-01'}) assert_equal 3, TimeEntry.where(:activity_id => 9, :project_id => 1).count assert_equal 1, TimeEntry.where(:activity_id => 10, :project_id => 1).count |