Sha256: 4b5767149483baa7be4b4411c3b504e5f1c80404b5d77b277c7470cd01e1e2c4
Contents?: true
Size: 1.3 KB
Versions: 6
Compression:
Stored size: 1.3 KB
Contents
require 'spec_helper' RSpec.describe NgrokAPI::Models::SSHHostCertificate do before(:each) do @client = class_double("SSHHostCertificatesClient") @ssh_host_certificate = NgrokAPI::Models::SSHHostCertificate.new(client: @client, result: ssh_host_certificate_result) end describe "#==" do it "is equal if the results are the same" do other = NgrokAPI::Models::SSHHostCertificate.new(client: @client, result: ssh_host_certificate_result) expect(@ssh_host_certificate == other).to eq true end end describe "#to_s" do it "stringifies as result.to_s" do expect(@ssh_host_certificate.to_s).to eq ssh_host_certificate_result.to_s end end describe "#delete" do it "calls delete on the client" do expect(@ssh_host_certificate.client).to receive(:delete) @ssh_host_certificate.delete end end describe "#update" do it "calls update on the client" do new_description = 'New description' new_metadata = 'New metadata' expect(@ssh_host_certificate.client).to receive(:update) @ssh_host_certificate.update( description: new_description, metadata: new_metadata ) expect(@ssh_host_certificate.description).to eq new_description expect(@ssh_host_certificate.metadata).to eq new_metadata end end end
Version data entries
6 entries across 6 versions & 1 rubygems