mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_ssl.rb: fix ssl option flags tests
* test/openssl/test_ssl.rb (test_setting_twice): ignore fixed falgs. some flags like SSL_OP_NO_SSL_MASK cannot change. * test/openssl/test_ssl.rb (test_options_setting_nil_means_all): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6fb2ec5394
commit
a50ba96779
1 changed files with 2 additions and 2 deletions
|
@ -28,7 +28,7 @@ class OpenSSL::TestSSL < OpenSSL::SSLTestCase
|
|||
def test_setting_twice
|
||||
ctx = OpenSSL::SSL::SSLContext.new
|
||||
ctx.options = 4
|
||||
assert_equal 4, ctx.options
|
||||
assert_equal 4, (ctx.options & OpenSSL::SSL::OP_ALL)
|
||||
ctx.options = OpenSSL::SSL::OP_ALL
|
||||
assert_equal OpenSSL::SSL::OP_ALL, ctx.options
|
||||
end
|
||||
|
@ -36,7 +36,7 @@ class OpenSSL::TestSSL < OpenSSL::SSLTestCase
|
|||
def test_options_setting_nil_means_all
|
||||
ctx = OpenSSL::SSL::SSLContext.new
|
||||
ctx.options = nil
|
||||
assert_equal OpenSSL::SSL::OP_ALL, ctx.options
|
||||
assert_equal(OpenSSL::SSL::OP_ALL, (OpenSSL::SSL::OP_ALL & ctx.options))
|
||||
end
|
||||
|
||||
def test_setting_options_raises_after_setup
|
||||
|
|
Loading…
Add table
Reference in a new issue