Sha256: 6720bb13b65eac82e8a9289910e481f384d471342e9356875d4f8b3e0ae50487

Contents?: true

Size: 1.11 KB

Versions: 15

Compression:

Stored size: 1.11 KB

Contents

require "spec_helper"

module Lumberg
  describe Cpanel::DomainKeys do
    let(:server) { Whm::Server.new(host: @whm_host, hash: @whm_hash) }
    let(:api_username) { "lumberg" }
    let(:domain_keys) do
      described_class.new(
        server:       server,
        api_username: api_username
      )
    end

    describe "#installed" do
      use_vcr_cassette "cpanel/domain_keys/installed"

      it "checks if DomainKeys was installed for domain" do
        domain_keys.installed[:params][:data][0][:installed].should == 1
      end
    end

    describe "#available" do
      use_vcr_cassette "cpanel/domain_keys/available"

      it "checks if DomainKeys is available on local server" do
        domain_keys.available[:params][:data][0][:available].should == 1
      end
    end

    describe "#add" do
      use_vcr_cassette "cpanel/domain_keys/add"

      subject { domain_keys.add[:params][:data][0] }
      it { should be_a(Hash) }
    end

    describe "#remove" do
      use_vcr_cassette "cpanel/domain_keys/remove"

      subject { domain_keys.add[:params][:data][0] }
      it { should be_a(Hash) }
    end

  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
lumberg-4.1.0 spec/cpanel/domain_keys_spec.rb
lumberg-4.0.0 spec/cpanel/domain_keys_spec.rb
lumberg-3.1.0 spec/cpanel/domain_keys_spec.rb
lumberg-3.0.0 spec/cpanel/domain_keys_spec.rb
lumberg-2.0.1 spec/cpanel/domain_keys_spec.rb
lumberg-2.0.0 spec/cpanel/domain_keys_spec.rb
lumberg-2.0.0.pre20 spec/cpanel/domain_keys_spec.rb
lumberg-2.0.0.pre18 spec/cpanel/domain_keys_spec.rb
lumberg-2.0.0.pre15 spec/cpanel/domain_keys_spec.rb
lumberg-2.0.0.pre12 spec/cpanel/domain_keys_spec.rb
lumberg-2.0.0.pre9 spec/cpanel/domain_keys_spec.rb
lumberg-2.0.0.pre8 spec/cpanel/domain_keys_spec.rb
lumberg-2.0.0.pre7 spec/cpanel/domain_keys_spec.rb
lumberg-2.0.0.pre6 spec/cpanel/domain_keys_spec.rb
lumberg-2.0.0.pre5 spec/cpanel/domain_keys_spec.rb