Sha256: b7fb5ebce0e7a26e1e147193cbc4967ddfdf2f5bc26c52bee9e6cfdee16cc178

Contents?: true

Size: 766 Bytes

Versions: 4

Compression:

Stored size: 766 Bytes

Contents

require 'test_helper'
require 'simple_aws/simple_db'

describe SimpleAWS::SimpleDB do

  before do
    @api = SimpleAWS::SimpleDB.new "key", "secret"
  end

  it "points to the endpoint" do
    @api.uri.must_equal "https://sdb.amazonaws.com"
  end

  it "works with the current version" do
    @api.version.must_equal "2009-04-15"
  end

  describe "API calls" do

    it "builds and signs calls with ActionParam rules" do
      SimpleAWS::Connection.any_instance.expects(:call).with do |request|
        params = request.params
        params.wont_be_nil

        params["Action"].must_equal "ListDomains"
        params["Signature"].wont_be_nil

        true
      end

      obj = SimpleAWS::SimpleDB.new "key", "secret"
      obj.list_domains
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
simple_aws-1.2.3 test/simple_aws/simple_db_test.rb
simple_aws-1.2.2 test/simple_aws/simple_db_test.rb
simple_aws-1.2.1 test/simple_aws/simple_db_test.rb
simple_aws-1.2.0 test/simple_aws/simple_db_test.rb