Project

General

Profile

Actions

Patch #31966

closed

Add missing fixtures to Redmine::Helpers::GanttHelperTest

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

Redmine::Helpers::GanttHelperTest has failed.

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

$ RAILS_ENV=test bundle exec rake test TEST=test/unit/lib/redmine/helpers/gantt_test.rb
Run options: --seed 57961

# Running:

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

Error:
Redmine::Helpers::GanttHelperTest#test_#column_content_for_issue:
ActiveRecord::RecordInvalid: Validation failed: Tracker cannot be blank, Status cannot be blank
    test/object_helpers.rb:107:in `generate!'
    test/unit/lib/redmine/helpers/gantt_test.rb:457:in `block in <class:GanttHelperTest>'

bin/rails test test/unit/lib/redmine/helpers/gantt_test.rb:454

.......E

Error:
Redmine::Helpers::GanttHelperTest#test_#selected_column_content:
ActiveRecord::RecordInvalid: Validation failed: Tracker cannot be blank, Status cannot be blank
    test/object_helpers.rb:107:in `generate!'
    test/unit/lib/redmine/helpers/gantt_test.rb:249:in `block in <class:GanttHelperTest>'

bin/rails test test/unit/lib/redmine/helpers/gantt_test.rb:247

.............................

Finished in 3.026629s, 16.1896 runs/s, 26.1016 assertions/s.
49 runs, 79 assertions, 0 failures, 2 errors, 0 skips

I think that because the fixtures is not enough.

diff --git a/test/unit/lib/redmine/helpers/gantt_test.rb b/test/unit/lib/redmine/helpers/gantt_test.rb
index 61de69483..1720ff6aa 100644
--- a/test/unit/lib/redmine/helpers/gantt_test.rb
+++ b/test/unit/lib/redmine/helpers/gantt_test.rb
@@ -20,7 +20,7 @@
 require File.expand_path('../../../../../test_helper', __FILE__)

 class Redmine::Helpers::GanttHelperTest < Redmine::HelperTest
-  fixtures :projects, :trackers, :issue_statuses,
+  fixtures :projects, :trackers, :projects_trackers, :issue_statuses,
            :enumerations, :users, :issue_categories

   include ProjectsHelper
Actions #1

Updated by Go MAEDA over 4 years ago

  • Target version set to 4.1.0
Actions #2

Updated by Go MAEDA over 4 years ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA

Committed the patch. Thank you for detecting and fixing the issue.

Actions

Also available in: Atom PDF