Sha256: 72c383a39a40d10ac0fa2bfdc54c1b893d9dc6cf62b3a031481dd8141b166b1f

Contents?: true

Size: 1 KB

Versions: 30

Compression:

Stored size: 1 KB

Contents

#
# Author:: Paulo Henrique Lopes Ribeiro (<plribeiro3000@gmail.com>)
# © Copyright IBM Corporation 2014.
#
# LICENSE: MIT (http://opensource.org/licenses/MIT)
#

Shindo.tests('Fog::Storage[:softlayer]', ['softlayer']) do
  tests('#_build_params') do
    tests('sending image/png files') do
      mocking = Fog.mocking?
      Fog.unmock!
      # Stubs Real Connection
      class Fog::Storage::Softlayer::Real
        def initialize(_options = {});end
      end
      @service = Fog::Storage::Softlayer.new(softlayer_username: 'name',
                                             softlayer_api_key: 'key',
                                             softlayer_cluster: 'cluster',
                                             softlayer_storage_account: 'account')
      # Testing header setup
      header = @service.send(:_build_params, { :headers => { 'Content-Type' => 'image/png' }})
      returns('image/png', 'properly sets the header') { header[:headers]['Content-Type'] }
      Fog.mock! if mocking
    end
  end
end

Version data entries

30 entries across 28 versions & 3 rubygems

Version Path
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-softlayer-1.1.4/tests/softlayer/storage_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-softlayer-1.1.4/tests/softlayer/storage_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-softlayer-1.1.4/tests/softlayer/storage_tests.rb
fog-softlayer-1.1.4 tests/softlayer/storage_tests.rb
fog-softlayer-1.1.3 tests/softlayer/storage_tests.rb
fog-softlayer-1.1.2 tests/softlayer/storage_tests.rb
fog-softlayer-1.1.1 tests/softlayer/storage_tests.rb
fog-softlayer-1.1.0 tests/softlayer/storage_tests.rb
fog-softlayer-1.0.3 tests/softlayer/storage_tests.rb
fog-softlayer-1.0.2 tests/softlayer/storage_tests.rb
fog-softlayer-1.0.1 tests/softlayer/storage_tests.rb
fog-softlayer-1.0.0 tests/softlayer/storage_tests.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-softlayer-0.4.7/tests/softlayer/storage_tests.rb
fog-softlayer-0.4.7 tests/softlayer/storage_tests.rb
fog-softlayer-0.4.6 tests/softlayer/storage_tests.rb
fog-softlayer-0.4.5 tests/softlayer/storage_tests.rb
fog-softlayer-0.4.4 tests/softlayer/storage_tests.rb
fog-softlayer-0.4.3 tests/softlayer/storage_tests.rb
fog-softlayer-0.4.2 tests/softlayer/storage_tests.rb
fog-softlayer-0.4.2.pre tests/softlayer/storage_tests.rb