File: certificate_spec.rb

package info (click to toggle)
puppet 4.8.2-5
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 20,736 kB
  • ctags: 14,616
  • sloc: ruby: 236,754; xml: 1,586; sh: 1,178; lisp: 299; sql: 103; yacc: 72; makefile: 52
file content (22 lines) | stat: -rw-r--r-- 743 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#! /usr/bin/env ruby
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
    expect(subject).to 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
    expect(subject.arguments).to eq([{ :ca_location => "local" }])
  end
end