Sha256: aeee595b3ea3fa5fff5465008de6da0e9378facfe955fc4e9b62aeb131abeda0

Contents?: true

Size: 1.41 KB

Versions: 10

Compression:

Stored size: 1.41 KB

Contents

require "spec_helper"

module Lumberg
  module Whostmgr
    describe Ssl do
      let(:ssl)    {  described_class.new(server: server) }
      let(:domain) { "lumberg-test.com" }

      let(:server) do
        Whm::Server.new(host: @whm_host, hash: @whm_hash, whostmgr: true)
      end

      describe "#remove" do
        use_vcr_cassette "whostmgr/ssl/remove"

        it "removes the cert" do
          ssl.remove(
            domain: domain
          )[:message].should eq "successfully deleted"
        end
      end

      describe "#remove_data" do
        use_vcr_cassette "whostmgr/ssl/remove_data"

        it "removes the cert data" do
          ssl.remove_data(
            id: 'c2600_26b3b_0e30b9d45805332236d6e4adf003f1b3', type: 'key'
          )[:message].should eq "deleted successfully"
        end
      end

      describe "#create" do
	use_vcr_cassette "whostmgr/ssl/create"

	subject do
	  ssl.create(
            city:             "houston",
            host:             "myhost.com",
            country:          "US",
            state:            "TX",
            company:          "Company",
            company_division: "Dept",
            email:            "test@myhost.com",
            pass:             "abc123",
            xemail:           "",
            noemail:          1)
	end

	its([:success]) { should be_true }
	its([:message]) { should eq "successfully generated" }
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
lumberg-4.1.0 spec/whostmgr/ssl_spec.rb
lumberg-4.0.0 spec/whostmgr/ssl_spec.rb
lumberg-3.1.0 spec/whostmgr/ssl_spec.rb
lumberg-3.0.0 spec/whostmgr/ssl_spec.rb
lumberg-2.0.1 spec/whostmgr/ssl_spec.rb
lumberg-2.0.0 spec/whostmgr/ssl_spec.rb
lumberg-2.0.0.pre20 spec/whostmgr/ssl_spec.rb
lumberg-2.0.0.pre18 spec/whostmgr/ssl_spec.rb
lumberg-2.0.0.pre15 spec/whostmgr/ssl_spec.rb
lumberg-2.0.0.pre12 spec/whostmgr/ssl_spec.rb