プロジェクト

全般

プロフィール

Vote #80308

完了

Add missing fixtures to IssueStatusesControllerTest

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

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

0%

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

説明

@IssueStatusesControllerTest#test_index_should_show_warning_when_no_workflow_is_defined@ has failed.

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

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

# Running:

......F

Failure:
IssueStatusesControllerTest#test_index_should_show_warning_when_no_workflow_is_defined [test/functional/issue_statuses_controller_test.rb:54]:
Expected exactly 0 elements matching "tr:not(:last-of-type) span.icon-warning", found 6..
Expected: 0
  Actual: 6


bin/rails test test/functional/issue_statuses_controller_test.rb:48

........

Finished in 1.213545s, 12.3605 runs/s, 37.0814 assertions/s.
15 runs, 45 assertions, 1 failures, 0 errors, 0 skips

I think that because the fixtures is not enough.


diff --git a/test/functional/issue_statuses_controller_test.rb b/test/functional/issue_statuses_controller_test.rb
index e46e807b9..a67ae87d7 100644
--- a/test/functional/issue_statuses_controller_test.rb
+++ b/test/functional/issue_statuses_controller_test.rb
@@ -20,7 +20,7 @@
 require File.expand_path('../../test_helper', __FILE__)

 class IssueStatusesControllerTest < Redmine::ControllerTest
-  fixtures :issue_statuses, :issues, :users, :trackers
+  fixtures :issue_statuses, :issues, :users, :trackers, :workflows

   def setup
     User.current = nil

journals

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

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

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

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

いいね!0
いいね!0