Sha256: 8bcec43225d847d4c86c1596238c5d7c2d4fa05a4cf632284e584bd88be0f742

Contents?: true

Size: 708 Bytes

Versions: 7

Compression:

Stored size: 708 Bytes

Contents

require 'test_helper'
require 'aws/iam'

describe AWS::IAM do

  before do
    @api = AWS::IAM.new "key", "secret"
  end

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

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

        true
      end

      obj = AWS::IAM.new "key", "secret"
      obj.get_group
    end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

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