Sha256: 94fc64f2b0012afec71faccddfadc631992b235ff056d32d28e1f1cd6f1983b5

Contents?: true

Size: 1007 Bytes

Versions: 2

Compression:

Stored size: 1007 Bytes

Contents

require "spec_helper"

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

    describe "#list" do
      use_vcr_cassette "cpanel/gpg/list"

      subject { gpg.list[:params][:data] }

      it { should be_an(Array) }
    end

    describe "#count" do
      use_vcr_cassette "cpanel/gpg/count"

      subject { gpg.count[:params][:data][0][:count] }

      it { should be_a(Integer) }
    end

    describe "#list_private" do
      use_vcr_cassette "cpanel/gpg/list_private"

      subject { gpg.list_private[:params][:data] }

      it { should be_an(Array) }
    end

    describe "#count_private" do
      use_vcr_cassette "cpanel/gpg/count_private"

      subject { gpg.count_private[:params][:data][0][:count] }

      it { should be_a(Integer) }
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
lumberg-2.0.0.pre4 spec/cpanel/gpg_spec.rb
lumberg-2.0.0.pre3 spec/cpanel/gpg_spec.rb