spec/aws/s3_spec.rb in heirloom-0.10.1 vs spec/aws/s3_spec.rb in heirloom-0.11.0.beta.1
- old
+ new
@@ -206,9 +206,19 @@
and_return body_mock
body_mock.should_receive(:body)
@s3.get_object('bucket', 'object')
end
+ it "should get an objects acl from s3" do
+ body_mock = mock 'body'
+ @fog_mock.should_receive(:get_object_acl).
+ with('bucket', 'object').and_return(body_mock)
+ body_mock.stub :body => 'data'
+ @s3.get_object_acl({ :bucket => 'bucket', :object_name => 'object'}).
+ should == 'data'
+ end
+
+
it "should set object acls" do
@fog_mock.should_receive(:put_object_acl).
with 'bucket', 'object', 'grants'
@s3.put_object_acl 'bucket', 'object', 'grants'
end