Sha256: ff538883fd29a3eeb99002c2d561de0c1b33e3b3acda81d5c51b91857b5933ae

Contents?: true

Size: 824 Bytes

Versions: 5

Compression:

Stored size: 824 Bytes

Contents

require 'test_helper'
require 'simple_aws/elasti_cache'

describe SimpleAWS::ElastiCache do

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

  it "points to the endpoint, default to us-east-1" do
    @api.uri.must_equal "https://elasticache.us-east-1.amazonaws.com"
  end

  it "works with the current version" do
    @api.version.must_equal "2011-07-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 "DescribeEvents"
        params["Signature"].wont_be_nil

        true
      end

      obj = SimpleAWS::ElastiCache.new "key", "secret"
      obj.describe_events
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

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