Sha256: 13474338adbd090d5a81d50257732065a0784ffd3c862aee60d1c2c6c100ca00

Contents?: true

Size: 470 Bytes

Versions: 4

Compression:

Stored size: 470 Bytes

Contents

require_relative '../../test_helper'
require 'rack'
require 'logster/redis_store'
require 'logster/middleware/reporter'

class TestReporter < Minitest::Test

  def test_logs_errors
    Logster.store = Logster::TestStore.new

    reporter = Logster::Middleware::Reporter.new(nil)
    env = Rack::MockRequest.env_for("/logs/report_js_error?message=hello")
    status, = reporter.call(env)

    assert_equal(200, status)
    assert_equal(1, Logster.store.count)
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
logster-2.3.1 test/logster/middleware/test_reporter.rb
logster-2.3.0 test/logster/middleware/test_reporter.rb
logster-2.2.0 test/logster/middleware/test_reporter.rb
logster-2.1.1 test/logster/middleware/test_reporter.rb