Sha256: f73283c52df826fcab066fa059973616bad6ba7f94a5ae17611308e31b031db1

Contents?: true

Size: 835 Bytes

Versions: 5

Compression:

Stored size: 835 Bytes

Contents

require 'test_helper'
require 'simple_aws/cloud_formation'

describe SimpleAWS::CloudFormation do

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

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

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

        true
      end

      obj = SimpleAWS::CloudFormation.new "key", "secret"
      obj.describe_stacks
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

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