Sha256: 3affb3e2f8c357b6fc7b5b381a73edb3ac1042d8284bf1d7040cb832d145fc9a
Contents?: true
Size: 831 Bytes
Versions: 234
Compression:
Stored size: 831 Bytes
Contents
require 'spec_helper' require 'puppet/network/http' describe Puppet::Network::HTTP::API::CA::V1 do let(:response) { Puppet::Network::HTTP::MemoryResponse.new } let(:ca_url_prefix) { "#{Puppet::Network::HTTP::CA_URL_PREFIX}/v1"} let(:ca_routes) { Puppet::Network::HTTP::Route. path(Regexp.new("#{Puppet::Network::HTTP::CA_URL_PREFIX}/")). any. chain(Puppet::Network::HTTP::API::CA::V1.routes) } it "mounts ca routes" do Puppet::SSL::Certificate.indirection.stubs(:find).returns "foo" request = Puppet::Network::HTTP::Request. from_hash(:path => "#{ca_url_prefix}/certificate/foo", :params => {:environment => "production"}, :headers => {"accept" => "s"}) ca_routes.process(request, response) expect(response.code).to eq(200) end end
Version data entries
234 entries across 234 versions & 1 rubygems