Sha256: 3646fa01a9bfc3b9a0d57049429cd0885d4adda4e5d79a708e00df919d4db3e5

Contents?: true

Size: 743 Bytes

Versions: 4

Compression:

Stored size: 743 Bytes

Contents

#! /usr/bin/env ruby -S rspec
require 'spec_helper'
require 'puppet/application/certificate'

describe Puppet::Application::Certificate do
  it "should have a 'ca-location' option" do
    # REVISIT: This is delegated from the face, and we will have a test there,
    # so is this actually a valuable test? --daniel 2011-04-07
    subject.command_line.stubs(:args).returns %w{list}
    subject.preinit
    subject.parse_options
    subject.should respond_to(:handle_ca_location)
  end

  it "should accept the ca-location option" do
    subject.command_line.stubs(:args).returns %w{--ca-location local list}
    subject.preinit
    subject.parse_options
    subject.setup
    subject.arguments.should == [{ :ca_location => "local" }]
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
puppet-3.0.0.rc8 spec/unit/application/certificate_spec.rb
puppet-3.0.0.rc7 spec/unit/application/certificate_spec.rb
puppet-3.0.0.rc5 spec/unit/application/certificate_spec.rb
puppet-3.0.0.rc4 spec/unit/application/certificate_spec.rb