Sha256: a9f11f0979e04d4e69ee7b1c728846cb78b571f61a0d2468126684a8f62c88c0

Contents?: true

Size: 842 Bytes

Versions: 5

Compression:

Stored size: 842 Bytes

Contents

Shindo.tests('Fog::Rackspace::Storage | account', ['rackspace']) do

  @account = Fog::Storage[:rackspace].account

  tests('load') do
    headers = @account.service.head_containers.headers

    returns(headers['X-Account-Meta-Temp-Url-Key']) { @account.meta_temp_url_key }
    returns(headers['X-Account-Container-Count'].to_i) { @account.container_count }
    returns(headers['X-Account-Bytes-Used'].to_i) { @account.bytes_used }
    returns(headers['X-Account-Object-Count'].to_i) { @account.object_count }
  end

  tests('reload') do
    @account.reload
  end

  tests('save') do
    key = "testing-update-#{Time.now.to_i}"
    @account.meta_temp_url_key = "testing-update-#{Time.now.to_i}"
    @account.save
    
    headers = @account.service.head_containers.headers
    returns(key) { headers['X-Account-Meta-Temp-Url-Key'] }
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
fog-1.22.0 tests/rackspace/models/storage/account_tests.rb
fog-1.21.0 tests/rackspace/models/storage/account_tests.rb
fog-maestrodev-1.20.0.20140305101839 tests/rackspace/models/storage/account_tests.rb
fog-maestrodev-1.20.0.20140305101305 tests/rackspace/models/storage/account_tests.rb
fog-1.20.0 tests/rackspace/models/storage/account_tests.rb