Sha256: e4cdc6cbf07eafd36848b374eb4ac5875d7ae245048806ed1376ebb622e51d20

Contents?: true

Size: 770 Bytes

Versions: 102

Compression:

Stored size: 770 Bytes

Contents

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

describe 'S3.head_object' do
  describe 'success' do

    before(:each) do
      AWS[:s3].put_bucket('fogheadobject')
      AWS[:s3].put_object('fogheadobject', 'fog_head_object', lorem_file)
    end

    after(:each) do
      AWS[:s3].delete_object('fogheadobject', 'fog_head_object')
      AWS[:s3].delete_bucket('fogheadobject')
    end

    it 'should return proper attributes' do
      actual = AWS[:s3].head_object('fogheadobject', 'fog_head_object')
      actual.status.should == 200
      data = lorem_file.read
      actual.headers['Content-Length'].should == data.length.to_s
      actual.headers['ETag'].should be_a(String)
      actual.headers['Last-Modified'].should be_a(String)
    end

  end
end

Version data entries

102 entries across 102 versions & 2 rubygems

Version Path
fog-0.2.30 spec/aws/requests/s3/head_object_spec.rb
fog-0.2.28 spec/aws/requests/s3/head_object_spec.rb
fog-0.2.27 spec/aws/requests/s3/head_object_spec.rb
fog-0.2.26 spec/aws/requests/s3/head_object_spec.rb
fog-0.2.25 spec/aws/requests/s3/head_object_spec.rb
fog-0.2.24 spec/aws/requests/s3/head_object_spec.rb
tecnh-fog-0.2.23.vpc spec/aws/requests/s3/head_object_spec.rb
fog-0.2.23 spec/aws/requests/s3/head_object_spec.rb
fog-0.2.22 spec/aws/requests/s3/head_object_spec.rb
fog-0.2.21 spec/aws/requests/s3/head_object_spec.rb
fog-0.2.20 spec/aws/requests/s3/head_object_spec.rb
fog-0.2.19 spec/aws/requests/s3/head_object_spec.rb
fog-0.2.18 spec/aws/requests/s3/head_object_spec.rb
fog-0.2.17 spec/aws/requests/s3/head_object_spec.rb
fog-0.2.16 spec/aws/requests/s3/head_object_spec.rb
fog-0.2.15 spec/aws/requests/s3/head_object_spec.rb
fog-0.2.14 spec/aws/requests/s3/head_object_spec.rb
fog-0.2.13 spec/aws/requests/s3/head_object_spec.rb
fog-0.2.12 spec/aws/requests/s3/head_object_spec.rb
fog-0.2.11 spec/aws/requests/s3/head_object_spec.rb