Sha256: 5e0003e3d4dcaf80cd9a14edf893bd108d16ba539774a3aa7c0a54b7bd72d812

Contents?: true

Size: 1.86 KB

Versions: 38

Compression:

Stored size: 1.86 KB

Contents

require 'spec_helper'

describe Ethon::Easy::Informations do
  let(:easy) { Ethon::Easy.new }

  before do
    easy.url = "http://localhost:3001"
    easy.perform
  end

  describe "#httpauth_avail" do
    it "returns" do
      expect(easy.httpauth_avail).to be
    end
  end

  describe "#total_time" do
    it "returns float" do
      expect(easy.total_time).to be_a(Float)
    end
  end

  describe "#starttransfer_time" do
    it "returns float" do
      expect(easy.starttransfer_time).to be_a(Float)
    end
  end

  describe "#appconnect_time" do
    it "returns float" do
      expect(easy.appconnect_time).to be_a(Float)
    end
  end

  describe "#pretransfer_time" do
    it "returns float" do
      expect(easy.pretransfer_time).to be_a(Float)
    end
  end

  describe "#connect_time" do
    it "returns float" do
      expect(easy.connect_time).to be_a(Float)
    end
  end

  describe "#namelookup_time" do
    it "returns float" do
      expect(easy.namelookup_time).to be_a(Float)
    end
  end

  describe "#redirect_time" do
    it "returns float" do
      expect(easy.redirect_time).to be_a(Float)
    end
  end

  describe "#effective_url" do
    it "returns url" do
      expect(easy.effective_url).to match(/^http:\/\/localhost:3001\/?/)
    end
  end

  describe "#primary_ip" do
    it "returns localhost" do
      expect(easy.primary_ip).to match(/::1|127\.0\.0\.1/)
    end
  end

  describe "#response_code" do
    it "returns 200" do
      expect(easy.response_code).to eq(200)
    end
  end

  describe "#redirect_count" do
    it "returns 0" do
      expect(easy.redirect_count).to eq(0)
    end
  end

  describe "#request_size" do
    it "returns 53" do
      expect(easy.request_size).to eq(53)
    end
  end

  describe "#supports_zlib?" do
    it "returns true" do
      expect(Kernel).to receive(:warn)
      expect(easy.supports_zlib?).to be_truthy
    end
  end


end

Version data entries

38 entries across 37 versions & 7 rubygems

Version Path
mfk_openapi_ruby_client-1.0.0 vendor/bundle/ruby/2.7.0/gems/ethon-0.12.0/spec/ethon/easy/informations_spec.rb
cloudsmith-api-0.54.15 vendor/bundle/ruby/2.6.0/gems/ethon-0.12.0/spec/ethon/easy/informations_spec.rb
cloudsmith-api-0.53.79 vendor/bundle/ruby/2.6.0/gems/ethon-0.12.0/spec/ethon/easy/informations_spec.rb
cloudsmith-api-0.53.17 vendor/bundle/ruby/2.6.0/gems/ethon-0.12.0/spec/ethon/easy/informations_spec.rb
cloudsmith-api-0.53.3 vendor/bundle/ruby/2.6.0/gems/ethon-0.12.0/spec/ethon/easy/informations_spec.rb
cloudsmith-api-0.53.1 vendor/bundle/ruby/2.6.0/gems/ethon-0.12.0/spec/ethon/easy/informations_spec.rb
cloudsmith-api-0.52.121 vendor/bundle/ruby/2.6.0/gems/ethon-0.12.0/spec/ethon/easy/informations_spec.rb
cloudsmith-api-0.52.92 vendor/bundle/ruby/2.6.0/gems/ethon-0.12.0/spec/ethon/easy/informations_spec.rb
cloudsmith-api-0.52.79 vendor/bundle/ruby/2.6.0/gems/ethon-0.12.0/spec/ethon/easy/informations_spec.rb
cloudsmith-api-0.52.5 vendor/bundle/ruby/2.6.0/gems/ethon-0.12.0/spec/ethon/easy/informations_spec.rb
cloudsmith-api-0.52.0 vendor/bundle/ruby/2.6.0/gems/ethon-0.12.0/spec/ethon/easy/informations_spec.rb
cloudsmith-api-0.51.93 vendor/bundle/ruby/2.3.0/gems/ethon-0.12.0/spec/ethon/easy/informations_spec.rb
cloudsmith-api-0.51.38 vendor/bundle/ruby/2.6.0/gems/ethon-0.12.0/spec/ethon/easy/informations_spec.rb
cloudsmith-api-0.51.37 vendor/bundle/ruby/2.6.0/gems/ethon-0.12.0/spec/ethon/easy/informations_spec.rb
cloudsmith-api-0.51.34 vendor/bundle/ruby/2.6.0/gems/ethon-0.12.0/spec/ethon/easy/informations_spec.rb
cloudsmith-api-0.51.22 vendor/bundle/ruby/2.6.0/gems/ethon-0.12.0/spec/ethon/easy/informations_spec.rb
talon_one-2.0.0 vendor/bundle/ruby/2.7.0/gems/ethon-0.12.0/spec/ethon/easy/informations_spec.rb
talon_one-2.0.0 vendor/bundle/ruby/2.3.0/gems/ethon-0.12.0/spec/ethon/easy/informations_spec.rb
cloudsmith-api-0.49.118 vendor/bundle/ruby/2.6.0/gems/ethon-0.12.0/spec/ethon/easy/informations_spec.rb
cloudsmith-api-0.49.98 vendor/bundle/ruby/2.6.0/gems/ethon-0.12.0/spec/ethon/easy/informations_spec.rb