spec/aws/s3_spec.rb in heirloom-0.5.0rc3 vs spec/aws/s3_spec.rb in heirloom-0.5.0rc4
- old
+ new
@@ -49,7 +49,23 @@
@fog_mock.should_receive(:put_object_acl).
with 'bucket', 'object', 'grants'
@s3.put_object_acl 'bucket', 'object', 'grants'
end
+ it "should call put bucket with location_constraint us-west-1" do
+ options = { 'LocationConstraint' => 'us-west-1',
+ 'x-amz-acl' => 'private' }
+ @fog_mock.should_receive(:put_bucket).
+ with('name', options)
+ @s3.put_bucket 'name', 'us-west-1'
+ end
+
+ it "should call put bucket with location_constraint nil when region us-west-1" do
+ options = { 'LocationConstraint' => nil,
+ 'x-amz-acl' => 'private' }
+ @fog_mock.should_receive(:put_bucket).
+ with('name', options)
+ @s3.put_bucket 'name', 'us-east-1'
+ end
+
end