diff options
Diffstat (limited to 'test/test_x509req.rb')
-rw-r--r-- | test/test_x509req.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/test_x509req.rb b/test/test_x509req.rb index a21d45da..2c447ccd 100644 --- a/test/test_x509req.rb +++ b/test/test_x509req.rb @@ -141,6 +141,16 @@ class OpenSSL::TestX509Request < OpenSSL::TestCase assert_equal(req.to_der, req.dup.to_der) end + def test_eq + req1 = issue_csr(0, @dn, @rsa1024, "sha1") + req2 = issue_csr(0, @dn, @rsa1024, "sha1") + req3 = issue_csr(0, @dn, @rsa1024, "sha256") + + assert_equal false, req1 == 12345 + assert_equal true, req1 == req2 + assert_equal false, req1 == req3 + end + private def request_error_returns_false |