spec/certificate_authority_spec.rb in r509-0.9.1 vs spec/certificate_authority_spec.rb in r509-0.9.2

- old
+ new

@@ -163,11 +163,11 @@ csr = R509::CSR.new(:csr => @csr) config = R509::Config::CAConfig.from_yaml("multi_policy_ca", File.read("#{File.dirname(__FILE__)}/fixtures/config_test_various.yaml"), {:ca_root_path => "#{File.dirname(__FILE__)}/fixtures"}) ca = R509::CertificateAuthority::Signer.new(config) cert = ca.sign(:csr => csr, :profile_name => 'server') cert.certificate_policies.should_not be_nil - cert.certificate_policies.policies.count.should == 2 + cert.certificate_policies.policies.count.should == 3 p0 = cert.certificate_policies.policies[0] p0.policy_identifier.should == "2.16.840.1.99999.21.234" p0.policy_qualifiers.cps_uris.should == ["http://example.com/cps", "http://haha.com"] p0.policy_qualifiers.user_notices.count.should == 1 un0 = p0.policy_qualifiers.user_notices[0] @@ -183,9 +183,12 @@ un1.notice_reference.organization.should == "another org" un1.explicit_text.should == 'this is a bad thing' un2 = p1.policy_qualifiers.user_notices[1] un2.notice_reference.should be_nil un2.explicit_text.should == "another user notice" + p2 = cert.certificate_policies.policies[2] + p2.policy_identifier.should == "2.16.840.1.99999.0" + p2.policy_qualifiers.should be_nil end it "issues a certificate with an authority key identifier" do csr = R509::CSR.new(:csr => @csr) cert = @ca.sign(:csr => csr, :profile_name => 'server') cert.authority_key_identifier.should_not be_nil