2009-06-07 01:55:52 -07:00
|
|
|
require File.dirname(__FILE__) + '/../../spec_helper'
|
|
|
|
|
|
|
|
describe 'S3.put_request_payment' do
|
|
|
|
|
2009-06-25 00:32:27 -07:00
|
|
|
before(:all) do
|
2009-08-11 21:40:59 -07:00
|
|
|
@s3 = Fog::AWS::S3.gen
|
2009-08-08 14:46:13 -07:00
|
|
|
@s3.put_bucket('fogputrequestpayment')
|
2009-06-25 00:32:27 -07:00
|
|
|
end
|
|
|
|
|
|
|
|
after(:all) do
|
2009-08-08 14:46:13 -07:00
|
|
|
@s3.delete_bucket('fogputrequestpayment')
|
2009-06-25 00:32:27 -07:00
|
|
|
end
|
|
|
|
|
2009-06-07 01:55:52 -07:00
|
|
|
it 'should return proper attributes' do
|
2009-08-08 14:46:13 -07:00
|
|
|
actual = @s3.put_request_payment('fogputrequestpayment', 'Requester')
|
2009-06-29 01:02:55 -07:00
|
|
|
actual.status.should == 200
|
2009-06-07 01:55:52 -07:00
|
|
|
end
|
|
|
|
|
2009-08-16 13:31:36 -07:00
|
|
|
it 'should raise a NotFound error if bucket does not exist' do
|
|
|
|
lambda {
|
|
|
|
@s3.put_request_payment('fognotabucket', 'Requester')
|
|
|
|
}.should raise_error(Fog::Errors::NotFound)
|
|
|
|
end
|
|
|
|
|
2009-06-07 01:55:52 -07:00
|
|
|
end
|