Sha256: 77d639c7adad9b30fe2ecd4bfe6317b4f45fc688cc616b1987afb460c9062833

Contents?: true

Size: 963 Bytes

Versions: 15

Compression:

Stored size: 963 Bytes

Contents

require "spec_helper"

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

    let(:random_password) { "realtopsecretpassword" }

    describe "#modify" do
      use_vcr_cassette "cpanel/password/modify"

      it "sets a new password for account" do
        result = password.modify({ old: '12345', new: random_password })
        result[:params][:data][0].should be_a(Hash)
      end
    end

    describe "#digest_authentication" do
      use_vcr_cassette "cpanel/password/digest_authentication"

      it "enables digest authentication for account" do
        result = password.digest_authentication({ password: random_password, enable: true })
        result[:params][:data][0].should be_a(Hash)
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

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