Sha256: 3760bb2c93d2699c4c37011f8417bd5ce6693bc042ae5dfc1236b48689756ade

Contents?: true

Size: 757 Bytes

Versions: 19

Compression:

Stored size: 757 Bytes

Contents

module Loquor
  class HttpAction::Test < Minitest::Test
    def setup 
      super 
      @access_id = "123"
      @secret_key = "Foobar132"
      @endpoint = "http://www.thefoobar.com"
      @cache = mock()
    end

    def deps
      logger = mock()
      logger.stubs(info: nil)

      config = mock()
      config.stubs(logger: logger)
      config.stubs(access_id: @access_id)
      config.stubs(secret_key: @secret_key)
      config.stubs(endpoint: @endpoint)
      config.stubs(cache: @cache)
      {config: config}
    end
    
    def test_execute_signs_and_executes
      json = "{}"
      action = HttpAction.new("", deps)
      action.expects(signed_request: mock(execute: json))
      assert_equal json, action.send(:execute)
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
loquor-1.11.0 test/http_action_test.rb
loquor-1.10.0 test/http_action_test.rb
loquor-1.9.0 test/http_action_test.rb
loquor-1.8.0 test/http_action_test.rb
loquor-1.7.0 test/http_action_test.rb
loquor-1.6.0 test/http_action_test.rb
loquor-1.5.0 test/http_action_test.rb
loquor-1.4.0 test/http_action_test.rb
loquor-1.3.0 test/http_action_test.rb
loquor-1.2.1 test/http_action_test.rb
loquor-1.2.0 test/http_action_test.rb
loquor-1.1.1 test/http_action_test.rb
loquor-1.1.0 test/http_action_test.rb
loquor-1.0.0 test/http_action_test.rb
loquor-0.9.0 test/http_action_test.rb
loquor-0.8.0 test/http_action_test.rb
loquor-0.7.0 test/http_action_test.rb
loquor-0.6.0 test/http_action_test.rb
loquor-0.5.4 test/http_action_test.rb