2009-08-17 15:55:30 -07:00
|
|
|
require File.dirname(__FILE__) + '/../../../spec_helper'
|
2009-05-18 23:06:49 -07:00
|
|
|
|
|
|
|
describe 'SimpleDB.put_attributes' do
|
2009-08-19 20:32:57 -07:00
|
|
|
describe 'success' do
|
2009-05-18 23:06:49 -07:00
|
|
|
|
2009-08-19 20:32:57 -07:00
|
|
|
before(:each) do
|
|
|
|
@domain_name = "fog_domain_#{Time.now.to_i}"
|
|
|
|
sdb.create_domain(@domain_name)
|
|
|
|
end
|
2009-05-18 23:06:49 -07:00
|
|
|
|
2009-08-19 20:32:57 -07:00
|
|
|
after(:each) do
|
|
|
|
sdb.delete_domain(@domain_name)
|
|
|
|
end
|
2009-05-18 23:06:49 -07:00
|
|
|
|
2009-08-19 20:32:57 -07:00
|
|
|
it 'should return proper attributes from put_attributes' do
|
|
|
|
actual = sdb.put_attributes(@domain_name, 'foo', { 'bar' => 'baz' })
|
|
|
|
actual.body['RequestId'].should be_a(String)
|
|
|
|
actual.body['BoxUsage'].should be_a(Float)
|
|
|
|
end
|
2009-05-18 23:06:49 -07:00
|
|
|
|
2009-08-19 20:32:57 -07:00
|
|
|
end
|
2009-05-18 23:06:49 -07:00
|
|
|
end
|