Sha256: 65429d093118761a0fe2192beac7cfbcf7fc085959831c8870ed656e62001aed
Contents?: true
Size: 804 Bytes
Versions: 3
Compression:
Stored size: 804 Bytes
Contents
require 'spec_helper' require 'dnsimple/certificate' require 'dnsimple/commands/purchase_certificate' describe DNSimple::Commands::PurchaseCertificate do let(:out) { StringIO.new } let(:domain_name) { 'example.com' } let(:domain) { stub('domain') } let(:contact) { stub('contact') } context "with one argument" do before :each do DNSimple::Domain.stubs(:find).returns(domain) DNSimple::Contact.stubs(:find).returns(contact) end it "purchases the certificate" do DNSimple::Certificate.expects(:purchase). with(domain, 'certname', contact). returns(stub("certificate", :fqdn => domain_name)) DNSimple::Commands::PurchaseCertificate.new(out). execute([domain_name, 'certname', stub('contact id')]) end end end
Version data entries
3 entries across 3 versions & 1 rubygems