From 2fdbcd35dd8cc2f6b98340825a57afd24ff89670 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 16 Dec 2018 16:28:22 +0000 Subject: 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 --- test/functional/project_enumerations_controller_test.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'test/functional/project_enumerations_controller_test.rb') 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 -- cgit v1.2.3