Project

General

Profile

Actions

Patch #32478

closed

Add missing fixture to TimelogControllerTest

Added by Yuichi HARADA over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Code cleanup/refactoring
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

TimelogControllerTest has failed.

$ RAILS_ENV=test bundle exec rake db:migrate:reset

$ RAILS_ENV=test bundle exec rake test TEST=test/functional/timelog_controller_test.rb
Run options: --seed 44668

# Running:

............................................E

Error:
TimelogControllerTest#test_index_with_issue_fixed_version_sort:
ActiveRecord::RecordNotFound: Couldn't find Version with 'id'=3
    test/functional/timelog_controller_test.rb:1249:in `test_index_with_issue_fixed_version_sort'

bin/rails test test/functional/timelog_controller_test.rb:1247

E

Error:
TimelogControllerTest#test_index_with_issue_fixed_version_column:
ActiveRecord::RecordNotFound: Couldn't find Version with 'id'=3
    test/functional/timelog_controller_test.rb:1198:in `test_index_with_issue_fixed_version_column'

bin/rails test test/functional/timelog_controller_test.rb:1196

........................................S................

Finished in 6.986126s, 14.7435 runs/s, 44.3737 assertions/s.
103 runs, 310 assertions, 0 failures, 2 errors, 1 skips

You have skipped tests. Run with --verbose for details.

I think that because the fixtures not enough.

diff --git a/test/functional/timelog_controller_test.rb b/test/functional/timelog_controller_test.rb
index 9c0b958b9..862fc226d 100644
--- a/test/functional/timelog_controller_test.rb
+++ b/test/functional/timelog_controller_test.rb
@@ -25,7 +25,7 @@ class TimelogControllerTest < Redmine::ControllerTest
            :trackers, :enumerations, :issue_statuses,
            :custom_fields, :custom_values,
            :projects_trackers, :custom_fields_trackers,
-           :custom_fields_projects, :issue_categories
+           :custom_fields_projects, :issue_categories, :versions

   include Redmine::I18n


Related issues

Related to Redmine - Feature #30346: Add "Target Version" to the list of "Available columns" in "Spent time" TabClosedGo MAEDA

Actions
Actions #1

Updated by Yuichi HARADA over 4 years ago

  • Copied from Patch #32444: Add missing fixture to Redmine::WikiFormatting::MacrosTest added
Actions #2

Updated by Go MAEDA over 4 years ago

  • Copied from deleted (Patch #32444: Add missing fixture to Redmine::WikiFormatting::MacrosTest)
Actions #3

Updated by Go MAEDA over 4 years ago

  • Status changed from New to Closed

Committed the patch. Thank you.

Actions #4

Updated by Go MAEDA over 4 years ago

  • Related to Feature #30346: Add "Target Version" to the list of "Available columns" in "Spent time" Tab added
Actions #5

Updated by Go MAEDA over 4 years ago

  • Target version deleted (4.2.0)

Cleared the target version because the fix is a part of #30346.

Actions

Also available in: Atom PDF