diff options
| author | Alban Peignier | 2018-03-26 12:28:44 +0200 |
|---|---|---|
| committer | Alban Peignier | 2018-03-26 12:28:44 +0200 |
| commit | 37fca065bbe7202f48cb014dcc2beafb0b151150 (patch) | |
| tree | d218a8a770f1f0a1cb4e1a1b6b5301fc3e53ea62 | |
| parent | 6ec08d613a49fc3df5665bd1aec5d661e36651bf (diff) | |
| download | chouette-core-37fca065bbe7202f48cb014dcc2beafb0b151150.tar.bz2 | |
Use utc time to make expectation with strftime (when timezone are not standard). Refs #6047
| -rw-r--r-- | spec/models/export/base_spec.rb | 4 | ||||
| -rw-r--r-- | spec/models/import/import_spec.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/spec/models/export/base_spec.rb b/spec/models/export/base_spec.rb index 9faf31e38..3d10ecead 100644 --- a/spec/models/export/base_spec.rb +++ b/spec/models/export/base_spec.rb @@ -129,8 +129,8 @@ RSpec.describe Export::Base, type: :model do Timecop.freeze(Time.now) do netex_export.notify_parent - expect(netex_export.notified_parent_at.strftime('%Y-%m-%d %H:%M:%S.%3N')).to eq Time.now.strftime('%Y-%m-%d %H:%M:%S.%3N') - expect(netex_export.reload.notified_parent_at.strftime('%Y-%m-%d %H:%M:%S.%3N')).to eq Time.now.strftime('%Y-%m-%d %H:%M:%S.%3N') + expect(netex_export.notified_parent_at.utc.strftime('%Y-%m-%d %H:%M:%S.%3N')).to eq Time.now.utc.strftime('%Y-%m-%d %H:%M:%S.%3N') + expect(netex_export.reload.notified_parent_at.utc.strftime('%Y-%m-%d %H:%M:%S.%3N')).to eq Time.now.utc.strftime('%Y-%m-%d %H:%M:%S.%3N') end end end diff --git a/spec/models/import/import_spec.rb b/spec/models/import/import_spec.rb index 73670b60f..b11c4922c 100644 --- a/spec/models/import/import_spec.rb +++ b/spec/models/import/import_spec.rb @@ -128,8 +128,8 @@ RSpec.describe Import::Base, type: :model do allow(workbench_import).to receive(:child_change) Timecop.freeze(Time.now) do netex_import.notify_parent - expect(netex_import.notified_parent_at.strftime('%Y-%m-%d %H:%M:%S.%3N')).to eq Time.now.strftime('%Y-%m-%d %H:%M:%S.%3N') - expect(netex_import.reload.notified_parent_at.strftime('%Y-%m-%d %H:%M:%S.%3N')).to eq Time.now.strftime('%Y-%m-%d %H:%M:%S.%3N') + expect(netex_import.notified_parent_at.utc.strftime('%Y-%m-%d %H:%M:%S.%3N')).to eq Time.now.utc.strftime('%Y-%m-%d %H:%M:%S.%3N') + expect(netex_import.reload.notified_parent_at.utc.strftime('%Y-%m-%d %H:%M:%S.%3N')).to eq Time.now.utc.strftime('%Y-%m-%d %H:%M:%S.%3N') end end end |
