Sha256: ae5038f45e3a2f5812874d613e346e0cf4bf5ee1c8461b457850927d018c6806

Contents?: true

Size: 815 Bytes

Versions: 16

Compression:

Stored size: 815 Bytes

Contents

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

describe 'Storage.head_object' do
  describe 'success' do

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

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

    it 'should return proper attributes' do
      actual = Google[:storage].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

16 entries across 16 versions & 1 rubygems

Version Path
fog-0.3.17 spec/google/requests/storage/head_object_spec.rb
fog-0.3.16 spec/google/requests/storage/head_object_spec.rb
fog-0.3.15 spec/google/requests/storage/head_object_spec.rb
fog-0.3.14 spec/google/requests/storage/head_object_spec.rb
fog-0.3.13 spec/google/requests/storage/head_object_spec.rb
fog-0.3.12 spec/google/requests/storage/head_object_spec.rb
fog-0.3.11 spec/google/requests/storage/head_object_spec.rb
fog-0.3.10 spec/google/requests/storage/head_object_spec.rb
fog-0.3.9 spec/google/requests/storage/head_object_spec.rb
fog-0.3.8 spec/google/requests/storage/head_object_spec.rb
fog-0.3.7 spec/google/requests/storage/head_object_spec.rb
fog-0.3.6 spec/google/requests/storage/head_object_spec.rb
fog-0.3.5 spec/google/requests/storage/head_object_spec.rb
fog-0.3.4 spec/google/requests/storage/head_object_spec.rb
fog-0.3.3 spec/google/requests/storage/head_object_spec.rb
fog-0.3.2 spec/google/requests/storage/head_object_spec.rb