Sha256: 5016425064f5ec61a4a362ea6dd7121533a461569ccf0dc46227d37b5f083adf
Contents?: true
Size: 857 Bytes
Versions: 2
Compression:
Stored size: 857 Bytes
Contents
require 'spec_helper' module SSLCheck describe 'CABundleValidatorSpec' do before do @cert = Certificate.new(VALID_CERT) @ca_bundle = [Certificate.new(CA_PARENT), Certificate.new(CA_GRAND_PARENT), Certificate.new(CA_GREAT_GRAND_PARENT)] end context "when the CA Bundle verifies the certificate" do it 'should return nothing' do sut = Validators::CABundle.new("npboards.com", @cert, @ca_bundle) result = sut.validate expect(result).to_not be end end context "when the certificate cannot be verified by the CA Bundle" do it 'should return errors' do sut = Validators::CABundle.new("npboards.com", @cert, [Certificate.new(VALID_CERT)]) result = sut.validate expect(result).to be_a SSLCheck::Errors::Validation::CABundleVerification end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
sslcheck-0.9.6 | spec/ca_bundle_validator_spec.rb |
sslcheck-0.9.5 | spec/ca_bundle_validator_spec.rb |