Sha256: 0284f9e904ad0b2c72d9435622cb5034e8ee2516b98b37d363097169c84261c9

Contents?: true

Size: 804 Bytes

Versions: 7

Compression:

Stored size: 804 Bytes

Contents

require 'test_helper'
require 'aws/cloud_formation'

describe AWS::CloudFormation do

  before do
    @api = AWS::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
      AWS::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 = AWS::CloudFormation.new "key", "secret"
      obj.describe_stacks
    end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
simple_aws-1.0.0 test/aws/cloud_formation_test.rb
simple_aws-1.0.0.pre3 test/aws/cloud_formation_test.rb
simple_aws-1.0.0.pre2 test/aws/cloud_formation_test.rb
simple_aws-1.0.0.pre1 test/aws/cloud_formation_test.rb
simple_aws-0.0.1d test/aws/cloud_formation_test.rb
simple_aws-0.0.1c test/aws/cloud_formation_test.rb
simple_aws-0.0.1b test/aws/cloud_formation_test.rb