Sha256: 5bb232d8c8bc5ce64e2b85cd89651754193d0c8f914ece9b5215a7a9465e422e

Contents?: true

Size: 814 Bytes

Versions: 8

Compression:

Stored size: 814 Bytes

Contents

require File.expand_path('../../test_helper', __FILE__)

module Loquor
  class HttpAction::DeleteTest < HttpAction::Test
    def test_delete_should_call_new
      url = "foobar"
      deps = {x: true}
      HttpAction::Delete.expects(:new).with(url, deps).returns(mock(delete: nil))
      HttpAction::Delete.delete(url, deps)
    end

    def test_delete_should_call_put
      HttpAction::Delete.any_instance.expects(:delete)
      HttpAction::Delete.delete("foobar", {})
    end

    def test_request_is_signed_correctly
      puts = HttpAction::Delete.new("", deps)
      request = RestClient::Request.new(url: "http://localhost:3000", method: :delete)
      puts.expects(request: request)
      ApiAuth.expects(:sign!).with(request, @access_id, @secret_key)
      puts.send(:signed_request)
    end
  end
end


Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
loquor-1.13.0 test/http_actions/delete_test.rb
loquor-1.12.0 test/http_actions/delete_test.rb
loquor-1.11.0 test/http_actions/delete_test.rb
loquor-1.10.0 test/http_actions/delete_test.rb
loquor-1.9.0 test/http_actions/delete_test.rb
loquor-1.8.0 test/http_actions/delete_test.rb
loquor-1.7.0 test/http_actions/delete_test.rb
loquor-1.6.0 test/http_actions/delete_test.rb