Project

General

Profile

Actions

Defect #33787

closed

Redmine::ApiTest::UsersTest fail if config.time_zone is set

Added by Yuichi HARADA over 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
REST API
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

If you set config.time_zone to a value other than UTC, the test will fail.

Set config.time_zone in config/additional_environment.rb.

config.time_zone = 'Tokyo'

Run the test.

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

$ RAILS_ENV=test bundle exec rake test TEST=test/integration/api_test/users_test.rb
Run options: --seed 38031

# Running:

..F

Failure:
Redmine::ApiTest::UsersTest#test_GET_/users/:id.xml_should_return_the_user [test/integration/api_test/users_test.rb:69]:
<2006-07-19T20:42:15Z> expected but was
<2006-07-20T05:42:15+09:00>..
Expected 0 to be >= 1.

bin/rails test test/integration/api_test/users_test.rb:64

.........F

Failure:
Redmine::ApiTest::UsersTest#test_GET_/users/:id.json_should_return_the_user [test/integration/api_test/users_test.rb:81]:
Expected: "2006-07-19T20:42:15Z" 
  Actual: "2006-07-20T05:42:15+09:00" 

bin/rails test test/integration/api_test/users_test.rb:73

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

Finished in 1.581580s, 16.4393 runs/s, 91.6805 assertions/s.
26 runs, 145 assertions, 2 failures, 0 errors, 0 skips

Files

33787-apitest-failed.patch (1013 Bytes) 33787-apitest-failed.patch Yuichi HARADA, 2020-07-30 07:35

Related issues

Related to Redmine - Feature #33592: Include updated_on and passwd_changed_on columns in users API responseClosedGo MAEDA

Actions
Actions

Also available in: Atom PDF