Sha256: 5d0939b3c59554f949dd2fab8b60d55222d73e6f15915f7bf2b28e6b9d0e3612
Contents?: true
Size: 1.2 KB
Versions: 3
Compression:
Stored size: 1.2 KB
Contents
require 'spec_helper' RSpec.describe NgrokAPI::Models::AgentIngress do before(:each) do @client = class_double("AgentIngresssClient") @agent_ingress = NgrokAPI::Models::AgentIngress.new(client: @client, result: agent_ingress_result) end describe "#==" do it "is equal if the results are the same" do other = NgrokAPI::Models::AgentIngress.new(client: @client, result: agent_ingress_result) expect(@agent_ingress == other).to eq true end end describe "#to_s" do it "stringifies as result.to_s" do expect(@agent_ingress.to_s).to eq agent_ingress_result.to_s end end describe "#delete" do it "calls delete on the client" do expect(@agent_ingress.client).to receive(:delete) @agent_ingress.delete end end describe "#update" do it "calls update on the client" do new_description = 'New description' new_metadata = 'New metadata' expect(@agent_ingress.client).to receive(:update) @agent_ingress.update( description: new_description, metadata: new_metadata ) expect(@agent_ingress.description).to eq new_description expect(@agent_ingress.metadata).to eq new_metadata end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ngrok-api-0.18.0 | spec/ngrokapi/models/agent_ingress_spec.rb |
ngrok-api-0.17.0 | spec/ngrokapi/models/agent_ingress_spec.rb |
ngrok-api-0.16.0 | spec/ngrokapi/models/agent_ingress_spec.rb |