diff options
Diffstat (limited to 'spec/models/pages_domain_spec.rb')
-rw-r--r-- | spec/models/pages_domain_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/models/pages_domain_spec.rb b/spec/models/pages_domain_spec.rb index 54747ddf525..fc7694530d0 100644 --- a/spec/models/pages_domain_spec.rb +++ b/spec/models/pages_domain_spec.rb @@ -97,8 +97,8 @@ describe PagesDomain do it 'saves validity time' do domain.save - expect(domain.certificate_valid_not_before).to be_like_time(Time.parse("2020-03-16 14:20:34 UTC")) - expect(domain.certificate_valid_not_after).to be_like_time(Time.parse("2220-01-28 14:20:34 UTC")) + expect(domain.certificate_valid_not_before).to be_like_time(Time.zone.parse("2020-03-16 14:20:34 UTC")) + expect(domain.certificate_valid_not_after).to be_like_time(Time.zone.parse("2220-01-28 14:20:34 UTC")) end end @@ -366,7 +366,7 @@ describe PagesDomain do let_it_be(:domain) { create(:pages_domain) } where(:attribute, :old_value, :new_value, :update_expected) do - now = Time.now + now = Time.current future = now + 1.day :project | nil | :project1 | true @@ -548,7 +548,7 @@ describe PagesDomain do it 'does not clear failure on unrelated updates' do expect do - domain.update!(verified_at: Time.now) + domain.update!(verified_at: Time.current) end.not_to change { domain.auto_ssl_failed }.from(true) end end |