diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-05-30 09:41:58 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-05-30 09:41:58 +0000 |
commit | ff2532e52d406bb29509ee63b8329a70ddfc5c52 (patch) | |
tree | 6d64f04519f957d31fe0ec986f50935f95e8740a /test/unit | |
parent | 78384d147a48a2d690c35f030232e232800dd919 (diff) | |
download | redmine-ff2532e52d406bb29509ee63b8329a70ddfc5c52.tar.gz redmine-ff2532e52d406bb29509ee63b8329a70ddfc5c52.zip |
Fixed test failures introduced by r14288 (#19656).
git-svn-id: http://svn.redmine.org/redmine/trunk@14291 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/time_entry_activity_test.rb | 10 | ||||
-rw-r--r-- | test/unit/time_entry_query_test.rb | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/test/unit/time_entry_activity_test.rb b/test/unit/time_entry_activity_test.rb index ab3a03530..8c6fef7aa 100644 --- a/test/unit/time_entry_activity_test.rb +++ b/test/unit/time_entry_activity_test.rb @@ -105,13 +105,13 @@ class TimeEntryActivityTest < ActiveSupport::TestCase def test_destroying_a_system_activity_should_reassign_children_activities project = Project.generate! + entries = [] + system_activity = TimeEntryActivity.create!(:name => 'Activity') + entries << TimeEntry.generate!(:project => project, :activity => system_activity) + project_activity = TimeEntryActivity.create!(:name => 'Activity', :project => project, :parent_id => system_activity.id) - - entries = [ - TimeEntry.generate!(:project => project, :activity => system_activity), - TimeEntry.generate!(:project => project, :activity => project_activity) - ] + entries << TimeEntry.generate!(:project => project.reload, :activity => project_activity) assert_difference 'TimeEntryActivity.count', -2 do assert_nothing_raised do diff --git a/test/unit/time_entry_query_test.rb b/test/unit/time_entry_query_test.rb index 3c4e3cdba..64b64107a 100644 --- a/test/unit/time_entry_query_test.rb +++ b/test/unit/time_entry_query_test.rb @@ -30,9 +30,9 @@ class TimeEntryQueryTest < ActiveSupport::TestCase def test_activity_filter_should_consider_system_and_project_activities TimeEntry.delete_all system = TimeEntryActivity.create!(:name => 'Foo') + TimeEntry.generate!(:activity => system, :hours => 1.0) override = TimeEntryActivity.create!(:name => 'Foo', :parent_id => system.id, :project_id => 1) other = TimeEntryActivity.create!(:name => 'Bar') - TimeEntry.generate!(:activity => system, :hours => 1.0) TimeEntry.generate!(:activity => override, :hours => 2.0) TimeEntry.generate!(:activity => other, :hours => 4.0) |