Sha256: 88db6705dea0ca07d4f90e2829bbfb05bb1aa862e882c18687d1949aed94b2cf

Contents?: true

Size: 920 Bytes

Versions: 30

Compression:

Stored size: 920 Bytes

Contents

Shindo.tests("Fog::Storage[:hp] | directory", ['hp', 'storage']) do

  file_attributes = {
    :key => 'fog_file_tests',
    :body => lorem_file,
    :public => true
  }

  directory_attributes = {
    :key => 'fogfilestests'
  }

  @directory = Fog::Storage[:hp].directories.create(directory_attributes)

  model_tests(@directory.files, file_attributes, true) do

    @file = @directory.files.get('fog_file_tests')

    tests('success') do

      tests("#directory").returns(@directory.key) do
        @file.directory.key
      end

      tests("#cdn_public_url").succeeds do
        pending if Fog.mocking?
        @file.cdn_public_url
      end

      tests("#cdn_public_ssl_url").succeeds do
        pending if Fog.mocking?
        @file.cdn_public_ssl_url
      end

      tests("#temp_signed_url(60, 'GET')").succeeds do
        @file.temp_signed_url(60, 'GET')
      end

    end
  end

  @directory.destroy

end

Version data entries

30 entries across 30 versions & 4 rubygems

Version Path
ns-fog-1.22.10 tests/hp/models/storage/file_tests.rb
ns-fog-1.22.9 tests/hp/models/storage/file_tests.rb
ns-fog-1.22.8 tests/hp/models/storage/file_tests.rb
ns-fog-1.22.7 tests/hp/models/storage/file_tests.rb
ns-fog-1.22.6 tests/hp/models/storage/file_tests.rb
fog-1.23.0 tests/hp/models/storage/file_tests.rb
ns-fog-1.22.4 tests/hp/models/storage/file_tests.rb
ns-fog-1.22.3 tests/hp/models/storage/file_tests.rb
ns-fog-1.22.2 tests/hp/models/storage/file_tests.rb
fog-1.22.1 tests/hp/models/storage/file_tests.rb