mirror of
https://github.com/rest-client/rest-client.git
synced 2022-11-09 13:49:40 -05:00
Test that OpenSSL constants have expected values.
This commit is contained in:
parent
b41a3941c3
commit
cf9d706917
1 changed files with 5 additions and 0 deletions
|
@ -500,6 +500,11 @@ describe RestClient::Request do
|
|||
@request.verify_ssl.should eq OpenSSL::SSL::VERIFY_PEER
|
||||
end
|
||||
|
||||
it "should have expected values for VERIFY_PEER and VERIFY_NONE" do
|
||||
OpenSSL::SSL::VERIFY_NONE.should eq(0)
|
||||
OpenSSL::SSL::VERIFY_PEER.should eq(1)
|
||||
end
|
||||
|
||||
it "should set net.verify_mode to OpenSSL::SSL::VERIFY_NONE if verify_ssl is false" do
|
||||
@request = RestClient::Request.new(:method => :put, :verify_ssl => false, :url => 'http://some/resource', :payload => 'payload')
|
||||
@net.should_receive(:verify_mode=).with(OpenSSL::SSL::VERIFY_NONE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue