Sha256: 1c6518b9c0e7dfd74fdd0f78d7dc9b778921ff878db4c85eccd8e762c0f36c27

Contents?: true

Size: 1.61 KB

Versions: 4

Compression:

Stored size: 1.61 KB

Contents

# Code generated for API Clients. DO NOT EDIT.

require 'spec_helper'

RSpec.describe NgrokAPI::Models::HTTPSEdge do
  before(:each) do
    @client = class_double("HTTPSEdgesClient")
    @https_edge = NgrokAPI::Models::HTTPSEdge.new(client: @client, attrs: https_edge_result)
  end

  describe "#==" do
    it "is equal if the results are the same" do
      other = NgrokAPI::Models::HTTPSEdge.new(client: @client, attrs: https_edge_result)
      expect(@https_edge == other).to eq true
    end
  end

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

  describe "#update" do
    it "calls update on the client" do
      new_description = 'New description'
      new_metadata = 'New metadata'
      new_hostports = 'New hostports'
      new_mutual_tls = 'New mutual_tls'
      new_tls_termination = 'New tls_termination'
      expect(@https_edge.client).to receive(:update)
      @https_edge.update(
        description: new_description,
        metadata: new_metadata,
        hostports: new_hostports,
        mutual_tls: new_mutual_tls,
        tls_termination: new_tls_termination
      )
      expect(@https_edge.description).to eq new_description
      expect(@https_edge.metadata).to eq new_metadata
      expect(@https_edge.hostports).to eq new_hostports
      expect(@https_edge.mutual_tls).to eq new_mutual_tls
      expect(@https_edge.tls_termination).to eq new_tls_termination
    end
  end

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ngrok-api-0.24.0 spec/ngrokapi/models/https_edge_spec.rb
ngrok-api-0.23.0 spec/ngrokapi/models/https_edge_spec.rb
ngrok-api-0.22.0 spec/ngrokapi/models/https_edge_spec.rb
ngrok-api-0.21.0 spec/ngrokapi/models/https_edge_spec.rb