プロジェクト

全般

プロフィール

Vote #79834

完了

TimeEntryTest#test_create_should_validate_user_id occasionally fails

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

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

0%

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

説明

You can always reproduce it by running tests with "@--seed 20474@" option.

$ bin/rails test --seed 20474
.
.
(snip)
.
.
...........................................................F

Failure:
TimeEntryTest#test_create_should_validate_user_id [/Users/maeda/redmines/redmine-trunk/test/unit/time_entry_test.rb:245]:
--- expected
+++ actual
@@ -1 +1 @@
-["User is invalid"]
+["Utilisateur n'est pas valide"]

journals

Here is a fix.

<pre><code class="diff">
diff --git a/test/unit/time_entry_test.rb b/test/unit/time_entry_test.rb
index b67f9f884..be115a81c 100644
--- a/test/unit/time_entry_test.rb
+++ b/test/unit/time_entry_test.rb
@@ -236,6 +236,7 @@ class TimeEntryTest < ActiveSupport::TestCase
end

def test_create_should_validate_user_id
+ set_language_if_valid 'en'
entry = TimeEntry.new(:spent_on => '2010-01-01',
:hours => 10,
:project_id => 1,
</code></pre>
--------------------------------------------------------------------------------
Committed.
--------------------------------------------------------------------------------

Admin Redmine さんが4年以上前に更新

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

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

いいね!0
いいね!0