summaryrefslogtreecommitdiff
path: root/certs/test/unit/client_certificate_test.rb
blob: 71a1d90288dc459578ed8b39dac945ce46746505 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
require 'test_helper'

class ClientCertificateTest < ActiveSupport::TestCase

  setup do
    @sample = ClientCertificate.new
  end

  test "new cert has all we need" do
    assert @sample.key
    assert @sample.cert
  end

  test "cert issuer matches ca subject" do
    cert = OpenSSL::X509::Certificate.new(@sample.cert)
    assert_equal ClientCertificate.root_ca.openssl_body.subject, cert.issuer
  end

end