mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[s3] fix nil expectations to match new parsers
This commit is contained in:
parent
6aa08be3ea
commit
0557b1625e
1 changed files with 9 additions and 9 deletions
|
@ -3,13 +3,13 @@ require File.dirname(__FILE__) + '/../../../spec_helper'
|
|||
describe 'S3.get_bucket' do
|
||||
describe 'success' do
|
||||
|
||||
before(:each) do
|
||||
before(:all) do
|
||||
AWS[:s3].put_bucket('foggetbucket')
|
||||
AWS[:s3].put_object('foggetbucket', 'fog_object', lorem_file)
|
||||
AWS[:s3].put_object('foggetbucket', 'fog_other_object', lorem_file)
|
||||
end
|
||||
|
||||
after(:each) do
|
||||
after(:all) do
|
||||
AWS[:s3].delete_object('foggetbucket', 'fog_object')
|
||||
AWS[:s3].delete_object('foggetbucket', 'fog_other_object')
|
||||
AWS[:s3].delete_bucket('foggetbucket')
|
||||
|
@ -18,10 +18,10 @@ describe 'S3.get_bucket' do
|
|||
it 'should return proper attributes' do
|
||||
actual = AWS[:s3].get_bucket('foggetbucket')
|
||||
actual.body['IsTruncated'].should == false
|
||||
actual.body['Marker'].should be_a(String)
|
||||
actual.body['Marker'].should be_nil
|
||||
actual.body['MaxKeys'].should be_an(Integer)
|
||||
actual.body['Name'].should be_a(String)
|
||||
actual.body['Prefix'].should be_a(String)
|
||||
actual.body['Prefix'].should be_nil
|
||||
actual.body['Contents'].should be_an(Array)
|
||||
actual.body['Contents'].length.should == 2
|
||||
object = actual.body['Contents'].first
|
||||
|
@ -41,7 +41,7 @@ describe 'S3.get_bucket' do
|
|||
actual.body['Marker'].should be_a(String)
|
||||
actual.body['MaxKeys'].should be_an(Integer)
|
||||
actual.body['Name'].should be_a(String)
|
||||
actual.body['Prefix'].should be_a(String)
|
||||
actual.body['Prefix'].should be_nil
|
||||
actual.body['Contents'].should be_an(Array)
|
||||
actual.body['Contents'].length.should == 1
|
||||
object = actual.body['Contents'].first
|
||||
|
@ -55,13 +55,13 @@ describe 'S3.get_bucket' do
|
|||
object['StorageClass'].should be_a(String)
|
||||
end
|
||||
|
||||
it 'should respect max-keys option' do
|
||||
it 'should accept max-keys option' do
|
||||
actual = AWS[:s3].get_bucket('foggetbucket', 'max-keys' => 1)
|
||||
actual.body['IsTruncated'].should == true
|
||||
actual.body['Marker'].should be_a(String)
|
||||
actual.body['Marker'].should be_nil
|
||||
actual.body['MaxKeys'].should be_an(Integer)
|
||||
actual.body['Name'].should be_a(String)
|
||||
actual.body['Prefix'].should be_a(String)
|
||||
actual.body['Prefix'].should be_nil
|
||||
actual.body['Contents'].should be_an(Array)
|
||||
actual.body['Contents'].length.should == 1
|
||||
object = actual.body['Contents'].first
|
||||
|
@ -78,7 +78,7 @@ describe 'S3.get_bucket' do
|
|||
it 'should accept prefix option' do
|
||||
actual = AWS[:s3].get_bucket('foggetbucket', 'prefix' => 'fog_ob')
|
||||
actual.body['IsTruncated'].should == false
|
||||
actual.body['Marker'].should be_a(String)
|
||||
actual.body['Marker'].should be_nil
|
||||
actual.body['MaxKeys'].should be_an(Integer)
|
||||
actual.body['Name'].should be_a(String)
|
||||
actual.body['Prefix'].should be_a(String)
|
||||
|
|
Loading…
Reference in a new issue