プロジェクト

全般

プロフィール

Vote #80277

完了

Add missing fixtures to Redmine::Helpers::GanttHelperTest

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Code cleanup/refactoring_30
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
30
version_id:
127
issue_org_id:
31966
author_id:
362529
assigned_to_id:
332
comments:
2
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

@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 '


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 '


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

journals

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

Admin Redmine さんが約4年前に更新

  • カテゴリCode cleanup/refactoring_30 にセット
  • 対象バージョン4.1.0_127 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0