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

class ClientCertificateTest < ActiveSupport::TestCase

  setup do
    @sample = ClientCertificate.new ClientCertificate.valid_attributes_hash
  end

  test "stub cert for testing is valid" do
    assert @sample.valid?
  end

  test "validates key" do
    @sample.key = nil
    assert @sample.valid?
    assert @sample.key, "Cert should generate key"
  end

  test "validates cert" do
    @sample.cert = nil
    assert @sample.valid?
    assert @sample.cert, "Cert should generate cert"
  end
end