mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
more filling out the specs
This commit is contained in:
parent
17975f4e96
commit
d3c6e44515
7 changed files with 15 additions and 13 deletions
|
@ -127,6 +127,7 @@ module Fog
|
|||
@response[:etag] = @value
|
||||
when 'LastModified'
|
||||
@response[:last_modified] = Time.parse(@value)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -17,13 +17,13 @@ describe 'S3.copy_object' do
|
|||
end
|
||||
|
||||
it 'should return proper attributes' do
|
||||
p 'SHOULD CHECK FOR PROPER ATTRIBUTES'
|
||||
actual = s3.copy_object(
|
||||
'fogcopyobjectsource', 'fog_copy_object_source',
|
||||
'fogcopyobjectdestination', 'fog_copy_object_destination'
|
||||
)
|
||||
actual.status.should == 200
|
||||
p actual
|
||||
actual.body[:etag].should be_a(String)
|
||||
actual.body[:last_modified].should be_a(Time)
|
||||
end
|
||||
|
||||
end
|
|
@ -11,10 +11,8 @@ describe 'S3.delete_bucket' do
|
|||
end
|
||||
|
||||
it 'should return proper attributes' do
|
||||
p 'SHOULD CHECK FOR PROPER ATTRIBUTES'
|
||||
actual = s3.delete_bucket('fogdeletebucket')
|
||||
actual.status.should == 204
|
||||
p actual
|
||||
end
|
||||
|
||||
it 'should not include fogdeletebucket in get_service after delete_bucket' do
|
||||
|
|
|
@ -13,10 +13,8 @@ describe 'S3.delete_object' do
|
|||
end
|
||||
|
||||
it 'should return proper attributes' do
|
||||
p 'SHOULD CHECK FOR PROPER ATTRIBUTES'
|
||||
actual = s3.delete_object('fogdeleteobject', 'fog_delete_object')
|
||||
actual.status.should == 204
|
||||
p actual
|
||||
end
|
||||
|
||||
end
|
|
@ -14,10 +14,14 @@ describe 'S3.get_object' do
|
|||
end
|
||||
|
||||
it 'should return proper attributes' do
|
||||
p 'SHOULD CHECK FOR PROPER ATTRIBUTES'
|
||||
actual = s3.get_object('foggetobject', 'fog_get_object')
|
||||
actual.status.should == 200
|
||||
p actual
|
||||
file = File.open(File.dirname(__FILE__) + '/../../lorem.txt', 'r')
|
||||
data = file.read
|
||||
actual.body.should == data
|
||||
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
|
||||
|
|
|
@ -14,10 +14,13 @@ describe 'S3.head_object' do
|
|||
end
|
||||
|
||||
it 'should return proper attributes' do
|
||||
p 'SHOULD CHECK FOR PROPER ATTRIBUTES'
|
||||
actual = s3.head_object('fogheadobject', 'fog_head_object')
|
||||
actual.status.should == 200
|
||||
p actual
|
||||
file = File.open(File.dirname(__FILE__) + '/../../lorem.txt', 'r')
|
||||
data = 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
|
|
@ -12,11 +12,9 @@ describe 'S3.put_object' do
|
|||
end
|
||||
|
||||
it 'should return proper attributes' do
|
||||
p 'SHOULD CHECK FOR PROPER ATTRIBUTES'
|
||||
file = File.open(File.dirname(__FILE__) + '/../../lorem.txt', 'r')
|
||||
actual = s3.put_object('fogputobject', 'fog_put_object', file)
|
||||
actual.status.should == 200
|
||||
p actual
|
||||
end
|
||||
|
||||
end
|
Loading…
Reference in a new issue