Sha256: b7dcadbcc7090b513c226d7fc9f60fc0952a8be18982abce9dd1ca4731e8f8b9

Contents?: true

Size: 869 Bytes

Versions: 56

Compression:

Stored size: 869 Bytes

Contents

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

  pending if Fog.mocking?

  @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

56 entries across 56 versions & 6 rubygems

Version Path
fog-maestrodev-1.19.0.20140212012611 tests/rackspace/models/storage/account_tests.rb
fog-maestrodev-1.19.0.20140110004459 tests/rackspace/models/storage/account_tests.rb
fog-maestrodev-1.19.0.20140110003812 tests/rackspace/models/storage/account_tests.rb
fog-maestrodev-1.19.0.20140109202555 tests/rackspace/models/storage/account_tests.rb
fog-maestrodev-1.19.0.20140107192102 tests/rackspace/models/storage/account_tests.rb
fog-maestrodev-1.19.0.20140107142106 tests/rackspace/models/storage/account_tests.rb
fog-maestrodev-1.19.0.20131219203941 tests/rackspace/models/storage/account_tests.rb
fog-maestrodev-1.18.0.20131219193542 tests/rackspace/models/storage/account_tests.rb
fog-1.19.0 tests/rackspace/models/storage/account_tests.rb
fog-maestrodev-1.18.0.20131219033443 tests/rackspace/models/storage/account_tests.rb
fog-maestrodev-1.18.0.20131219032002 tests/rackspace/models/storage/account_tests.rb
fog-maestrodev-1.18.0.20131219030716 tests/rackspace/models/storage/account_tests.rb
fog-maestrodev-1.18.0.20131219022322 tests/rackspace/models/storage/account_tests.rb
fog-maestrodev-1.18.0.20131218202447 tests/rackspace/models/storage/account_tests.rb
fog-maestrodev-1.18.0.20131209091424 tests/rackspace/models/storage/account_tests.rb
fog-maestrodev-1.18.0.20131209090811 tests/rackspace/models/storage/account_tests.rb
fog-maestrodev-1.18.0.20131206115947 tests/rackspace/models/storage/account_tests.rb
fog-maestrodev-1.18.0.20131205181604 tests/rackspace/models/storage/account_tests.rb
fog-maestrodev-1.18.0.20131127194823 tests/rackspace/models/storage/account_tests.rb
fog-maestrodev-1.18.0.20131126183714 tests/rackspace/models/storage/account_tests.rb