Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

file 22 lines (19 sloc) 0.487 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
class LogglyTest < Service::TestCase
  def setup
    @stubs = Faraday::Adapter::Test::Stubs.new
  end

  def test_push
    @stubs.post "/inputs/input-foo" do |env|
      assert_equal 'application/json', env[:request_headers]['Content-Type']
      assert_equal 'logs.loggly.com', env[:url].host
      [200, {}, '']
    end

    svc = service(
      {"input_token" => "input-foo"},
      payload)
    svc.receive_push
  end

  def service(*args)
    super Service::Loggly, *args
  end
end
Something went wrong with that request. Please try again.