Sha256: 926d93f86fe9fb66960521bb6ec55b84efcd2d448e19f0d2afc5d38ecfdb2af3

Contents?: true

Size: 811 Bytes

Versions: 6

Compression:

Stored size: 811 Bytes

Contents

require 'spec_helper'

RSpec.describe NgrokAPI::Models::ReservedDomain do
  before(:each) do
    @client = class_double("ReservedDomainsClient")
    @reserved_domain = NgrokAPI::Models::ReservedDomain.new(client: @client, result: reserved_domain_result)
  end

  describe "#==" do
    it "is equal if the results are the same" do
      other = NgrokAPI::Models::ReservedDomain.new(client: @client, result: reserved_domain_result)
      expect(@reserved_domain == other).to eq true
    end
  end

  describe "#to_s" do
    it "stringifies as result.to_s" do
      expect(@reserved_domain.to_s).to eq reserved_domain_result.to_s
    end
  end

  describe "#delete" do
    it "calls delete on the client" do
      expect(@reserved_domain.client).to receive(:delete)
      @reserved_domain.delete
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ngrok-api-0.18.0 spec/ngrokapi/models/reserved_domain_spec.rb
ngrok-api-0.17.0 spec/ngrokapi/models/reserved_domain_spec.rb
ngrok-api-0.16.0 spec/ngrokapi/models/reserved_domain_spec.rb
ngrok-api-0.15.0 spec/ngrokapi/models/reserved_domain_spec.rb
ngrok-api-0.14.0 spec/ngrokapi/models/reserved_domain_spec.rb
ngrok-api-0.12.0 spec/ngrokapi/models/reserved_domain_spec.rb