Sha256: 25bb8e35a70dc2e655f3c1b73bffc4f984888a67ad20d0dee8e74df78f45fd91

Contents?: true

Size: 854 Bytes

Versions: 156

Compression:

Stored size: 854 Bytes

Contents

require 'spec_helper'

require 'puppet/indirector/file_bucket_file/selector'
require 'puppet/indirector/file_bucket_file/file'
require 'puppet/indirector/file_bucket_file/rest'

describe Puppet::FileBucketFile::Selector do
  %w[head find save search destroy].each do |method|
    describe "##{method}" do
      it "should proxy to rest terminus for https requests" do
        request = double('request', :protocol => 'https')

        expect_any_instance_of(Puppet::FileBucketFile::Rest).to receive(method).with(request)

        subject.send(method, request)
      end

      it "should proxy to file terminus for other requests" do
        request = double('request', :protocol => 'file')

        expect_any_instance_of(Puppet::FileBucketFile::File).to receive(method).with(request)

        subject.send(method, request)
      end
    end
  end
end

Version data entries

156 entries across 156 versions & 1 rubygems

Version Path
puppet-7.1.0 spec/unit/indirector/file_bucket_file/selector_spec.rb
puppet-7.1.0-x86-mingw32 spec/unit/indirector/file_bucket_file/selector_spec.rb
puppet-7.1.0-x64-mingw32 spec/unit/indirector/file_bucket_file/selector_spec.rb
puppet-7.1.0-universal-darwin spec/unit/indirector/file_bucket_file/selector_spec.rb
puppet-7.0.0 spec/unit/indirector/file_bucket_file/selector_spec.rb
puppet-7.0.0-x86-mingw32 spec/unit/indirector/file_bucket_file/selector_spec.rb
puppet-7.0.0-x64-mingw32 spec/unit/indirector/file_bucket_file/selector_spec.rb
puppet-7.0.0-universal-darwin spec/unit/indirector/file_bucket_file/selector_spec.rb
puppet-6.19.1 spec/unit/indirector/file_bucket_file/selector_spec.rb
puppet-6.19.1-x86-mingw32 spec/unit/indirector/file_bucket_file/selector_spec.rb
puppet-6.19.1-x64-mingw32 spec/unit/indirector/file_bucket_file/selector_spec.rb
puppet-6.19.1-universal-darwin spec/unit/indirector/file_bucket_file/selector_spec.rb
puppet-5.5.22 spec/unit/indirector/file_bucket_file/selector_spec.rb
puppet-5.5.22-x86-mingw32 spec/unit/indirector/file_bucket_file/selector_spec.rb
puppet-5.5.22-x64-mingw32 spec/unit/indirector/file_bucket_file/selector_spec.rb
puppet-5.5.22-universal-darwin spec/unit/indirector/file_bucket_file/selector_spec.rb
puppet-6.19.0 spec/unit/indirector/file_bucket_file/selector_spec.rb
puppet-6.19.0-x86-mingw32 spec/unit/indirector/file_bucket_file/selector_spec.rb
puppet-6.19.0-x64-mingw32 spec/unit/indirector/file_bucket_file/selector_spec.rb
puppet-6.19.0-universal-darwin spec/unit/indirector/file_bucket_file/selector_spec.rb