Skip to content

Commit

Permalink
[test] use refute instead of negated assert
Browse files Browse the repository at this point in the history
  • Loading branch information
kares committed Jun 20, 2024
1 parent ad6bc89 commit f259529
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/test/ruby/ssl/test_ssl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ def test_post_connection_check
cert = ssl.peer_cert
assert OpenSSL::SSL.verify_certificate_identity(cert, "localhost.localdomain")
assert OpenSSL::SSL.verify_certificate_identity(cert, "127.0.0.1")
assert ! OpenSSL::SSL.verify_certificate_identity(cert, "localhost")
assert ! OpenSSL::SSL.verify_certificate_identity(cert, "foo.example.com")
refute OpenSSL::SSL.verify_certificate_identity(cert, "localhost")
refute OpenSSL::SSL.verify_certificate_identity(cert, "foo.example.com")
end

now = Time.now
Expand All @@ -74,9 +74,9 @@ def test_post_connection_check
assert_raise(sslerr) { ssl.post_connection_check("foo.example.com") }
cert = ssl.peer_cert
assert OpenSSL::SSL.verify_certificate_identity(cert, "localhost.localdomain")
assert ! OpenSSL::SSL.verify_certificate_identity(cert, "127.0.0.1")
assert ! OpenSSL::SSL.verify_certificate_identity(cert, "localhost")
assert ! OpenSSL::SSL.verify_certificate_identity(cert, "foo.example.com")
refute OpenSSL::SSL.verify_certificate_identity(cert, "127.0.0.1")
refute OpenSSL::SSL.verify_certificate_identity(cert, "localhost")
refute OpenSSL::SSL.verify_certificate_identity(cert, "foo.example.com")
end
end

Expand Down

0 comments on commit f259529

Please sign in to comment.