Sha256: 96a70b158f1ae4bd4d09f455d5f7c38deeaee4e435fa04ff01ce72062fe65ce6

Contents?: true

Size: 771 Bytes

Versions: 5

Compression:

Stored size: 771 Bytes

Contents

require 'test_helper'
require 'simple_aws/sns'

describe SimpleAWS::SNS do

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

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

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

        true
      end

      obj = SimpleAWS::SNS.new "key", "secret"
      obj.list_topics
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

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