Sha256: 1af563b0ff61f28561a16c89744ce69c30291b91ec5444297c02ceea5e5f4842

Contents?: true

Size: 856 Bytes

Versions: 11

Compression:

Stored size: 856 Bytes

Contents

require File.dirname(__FILE__) + '/../../../spec_helper'

describe 'SimpleDB.batch_put_attributes' do
  describe 'success' do

    before(:all) do
      @domain_name = "fog_domain_#{Time.now.to_i}"
      sdb.create_domain(@domain_name)
    end

    after(:all) do
      sdb.delete_domain(@domain_name)
    end

    it 'should return proper attributes' do
      actual = sdb.batch_put_attributes(@domain_name, { 'a' => { 'b' => 'c' }, 'x' => { 'y' => 'z' } })
      actual.body['RequestId'].should be_a(String)
      actual.body['BoxUsage'].should be_a(Float)
    end

  end
  describe 'failure' do

    it 'should raise a BadRequest error if the domain does not exist' do
      lambda {
        sdb.batch_put_attributes('notadomain', { 'a' => { 'b' => 'c' }, 'x' => { 'y' => 'z' } })
      }.should raise_error(Excon::Errors::BadRequest)
    end

  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
fog-0.0.40 spec/aws/requests/simpledb/batch_put_attributes_spec.rb
fog-0.0.39 spec/aws/requests/simpledb/batch_put_attributes_spec.rb
fog-0.0.38 spec/aws/requests/simpledb/batch_put_attributes_spec.rb
fog-0.0.37 spec/aws/requests/simpledb/batch_put_attributes_spec.rb
fog-0.0.36 spec/aws/requests/simpledb/batch_put_attributes_spec.rb
fog-0.0.35 spec/aws/requests/simpledb/batch_put_attributes_spec.rb
fog-0.0.34 spec/aws/requests/simpledb/batch_put_attributes_spec.rb
fog-0.0.33 spec/aws/requests/simpledb/batch_put_attributes_spec.rb
fog-0.0.32 spec/aws/requests/simpledb/batch_put_attributes_spec.rb
fog-0.0.31 spec/aws/requests/simpledb/batch_put_attributes_spec.rb
fog-0.0.30 spec/aws/requests/simpledb/batch_put_attributes_spec.rb