diff options
author | Vladimir Shushlin <vshushlin@gitlab.com> | 2019-06-06 22:14:09 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2019-06-06 22:14:09 +0300 |
commit | d1d05ae4f34aab350db86e03859c97e90f515520 (patch) | |
tree | c318ad0a14b556b7bacafc7e042219ae44687c92 /spec/models/pages_domain_spec.rb | |
parent | bb02557cbd1e8a7c97fac4c24c40e6e02c809a9a (diff) |
Add certificate valid time to pages domain table
Save certificate validity time for pages domains on save
Fill validity time for existing pages domains in background migration
Diffstat (limited to 'spec/models/pages_domain_spec.rb')
-rw-r--r-- | spec/models/pages_domain_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/models/pages_domain_spec.rb b/spec/models/pages_domain_spec.rb index ec4d4517f82..fdc81359d34 100644 --- a/spec/models/pages_domain_spec.rb +++ b/spec/models/pages_domain_spec.rb @@ -81,6 +81,17 @@ describe PagesDomain do end end + describe 'when certificate is specified' do + let(:domain) { build(:pages_domain) } + + it 'saves validity time' do + domain.save + + expect(domain.certificate_valid_not_before).to be_like_time(Time.parse("2016-02-12 14:32:00 UTC")) + expect(domain.certificate_valid_not_after).to be_like_time(Time.parse("2020-04-12 14:32:00 UTC")) + end + end + describe 'validate certificate' do subject { domain } |