Sha256: aa909d981031c7caef37f239bb1195a02c874b5de17db34fd54cba820e392fab

Contents?: true

Size: 768 Bytes

Versions: 14

Compression:

Stored size: 768 Bytes

Contents

require File.dirname(__FILE__) + '/../../../spec_helper'

describe 'Storage.get_bucket_location' do
  describe 'success' do

    before(:each) do
      AWS[:storage].put_bucket('foggetlocation', 'LocationConstraint' => 'EU')
    end

    after(:each) do
      AWS[:eu_storage].delete_bucket('foggetlocation')
    end

    it 'should return proper attributes' do
      actual = AWS[:storage].get_bucket_location('foggetlocation')
      actual.status.should == 200
      actual.body['LocationConstraint'].should == 'EU'
    end

  end
  describe 'failure' do

    it 'should raise NotFound error if bucket does not exist' do
      lambda {
        AWS[:storage].get_bucket_location('fognotabucket')
      }.should raise_error(Excon::Errors::NotFound)
    end

  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
fog-0.3.13 spec/aws/requests/storage/get_bucket_location_spec.rb
fog-0.3.12 spec/aws/requests/storage/get_bucket_location_spec.rb
fog-0.3.11 spec/aws/requests/storage/get_bucket_location_spec.rb
fog-0.3.10 spec/aws/requests/storage/get_bucket_location_spec.rb
fog-0.3.9 spec/aws/requests/storage/get_bucket_location_spec.rb
fog-0.3.8 spec/aws/requests/storage/get_bucket_location_spec.rb
fog-0.3.7 spec/aws/requests/storage/get_bucket_location_spec.rb
fog-0.3.6 spec/aws/requests/storage/get_bucket_location_spec.rb
fog-0.3.5 spec/aws/requests/s3/get_bucket_location_spec.rb
fog-0.3.4 spec/aws/requests/s3/get_bucket_location_spec.rb
fog-0.3.3 spec/aws/requests/s3/get_bucket_location_spec.rb
fog-0.3.2 spec/aws/requests/s3/get_bucket_location_spec.rb
fog-0.3.1 spec/aws/requests/s3/get_bucket_location_spec.rb
fog-0.3.0 spec/aws/requests/s3/get_bucket_location_spec.rb