From f259529fee4f5b9f243abaad8cfb24c8500cc30e Mon Sep 17 00:00:00 2001 From: kares Date: Thu, 20 Jun 2024 13:22:52 +0200 Subject: [PATCH] [test] use refute instead of negated assert --- src/test/ruby/ssl/test_ssl.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/test/ruby/ssl/test_ssl.rb b/src/test/ruby/ssl/test_ssl.rb index a7153c70..91247d5e 100644 --- a/src/test/ruby/ssl/test_ssl.rb +++ b/src/test/ruby/ssl/test_ssl.rb @@ -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 @@ -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