diff options
author | Vladimir Shushlin <vshushlin@gitlab.com> | 2019-09-07 00:29:03 +0000 |
---|---|---|
committer | Michael Kozono <mkozono@gmail.com> | 2019-09-07 00:29:03 +0000 |
commit | 8c3d0703ed71e9ac166b221146176a3ea7e23989 (patch) | |
tree | d40d8446bf384a0cffb95e818bbeac4f55221a8a /spec/models | |
parent | 7920ff1147051324e63c6b28cd93ca616d5b3165 (diff) | |
download | gitlab-ce-8c3d0703ed71e9ac166b221146176a3ea7e23989.tar.gz |
Allow to load ECDSA certificates for pages domains
Just replace RSA.new with PKey.read
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/pages_domain_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/models/pages_domain_spec.rb b/spec/models/pages_domain_spec.rb index 519c519fbcf..5168064bb84 100644 --- a/spec/models/pages_domain_spec.rb +++ b/spec/models/pages_domain_spec.rb @@ -151,6 +151,24 @@ describe PagesDomain do end end end + + context 'with ecdsa certificate' do + it "is valid" do + domain = build(:pages_domain, :ecdsa) + + expect(domain).to be_valid + end + + context 'when curve is set explicitly by parameters' do + it 'adds errors to private key' do + domain = build(:pages_domain, :explicit_ecdsa) + + expect(domain).to be_invalid + + expect(domain.errors[:key]).not_to be_empty + end + end + end end describe 'validations' do |