Sha256: 6fe1929c178c54d08cd859386dbdb7acb3acce40241a3d4ce97ea2014d41b213

Contents?: true

Size: 1.5 KB

Versions: 3

Compression:

Stored size: 1.5 KB

Contents

require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')


  # Most useless tests ever, but who knows, right?

  if defined?(Typhoeus)

    describe "Cloudhdr::HTTP::Typhoeus" do
      describe ".post" do
        it "should POST using Typhoeus" do
          Typhoeus::Request.expects(:post).with('https://example.com', {:some => 'options'})
          Cloudhdr::HTTP::Typhoeus.post('https://example.com', {:some => 'options'})
        end
      end

      describe ".put" do
        it "should PUT using Typhoeus" do
          Typhoeus::Request.expects(:put).with('https://example.com', {:some => 'options'})
          Cloudhdr::HTTP::Typhoeus.put('https://example.com', {:some => 'options'})
        end
      end

      describe ".get" do
        it "should GET using Typhoeus" do
          Typhoeus::Request.expects(:get).with('https://example.com', {:some => 'options'})
          Cloudhdr::HTTP::Typhoeus.get('https://example.com', {:some => 'options'})
        end
      end

      describe ".delete" do
        it "should DELETE using Typhoeus" do
          Typhoeus::Request.expects(:delete).with('https://example.com', {:some => 'options'})
          Cloudhdr::HTTP::Typhoeus.delete('https://example.com', {:some => 'options'})
        end
      end

      it "should skip ssl verification" do
        Typhoeus::Request.expects(:get).with('https://example.com', {:disable_ssl_peer_verification => true})
        Cloudhdr::HTTP::Typhoeus.get('https://example.com', {:skip_ssl_verify => true})
      end
    end

  end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cloudhdr-0.0.3 spec/cloudhdr/http/typhoeus_spec.rb
cloudhdr-0.0.2 spec/cloudhdr/http/typhoeus_spec.rb
cloudhdr-0.0.1 spec/cloudhdr/http/typhoeus_spec.rb