Project

General

Profile

Actions

Defect #30806

closed

TimeEntryTest#test_create_should_validate_user_id occasionally fails

Added by Go MAEDA about 5 years ago. Updated about 5 years ago.

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

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

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"]
Actions #1

Updated by Go MAEDA about 5 years ago

  • Target version set to 4.1.0

Here is a fix.

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,
Actions #2

Updated by Go MAEDA about 5 years ago

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

Committed.

Actions

Also available in: Atom PDF