Sha256: 3304cb52d9dd0fa4ddeebade072b3d9385dcbdd96c5a0f1063298341a2373b12

Contents?: true

Size: 472 Bytes

Versions: 40

Compression:

Stored size: 472 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

40 entries across 40 versions & 1 rubygems

Version Path
logster-1.3.1 test/logster/middleware/test_reporter.rb
logster-1.2.11 test/logster/middleware/test_reporter.rb
logster-1.2.9 test/logster/middleware/test_reporter.rb
logster-1.2.8 test/logster/middleware/test_reporter.rb
logster-1.2.7 test/logster/middleware/test_reporter.rb
logster-1.2.6 test/logster/middleware/test_reporter.rb
logster-1.2.5 test/logster/middleware/test_reporter.rb
logster-1.2.4 test/logster/middleware/test_reporter.rb
logster-1.2.3 test/logster/middleware/test_reporter.rb
logster-1.2.2 test/logster/middleware/test_reporter.rb
logster-1.2.1 test/logster/middleware/test_reporter.rb
logster-1.2.0 test/logster/middleware/test_reporter.rb
logster-1.1.1 test/logster/middleware/test_reporter.rb
logster-1.0.1 test/logster/middleware/test_reporter.rb
logster-1.0.0.3.pre test/logster/middleware/test_reporter.rb
logster-1.0.0.2.pre test/logster/middleware/test_reporter.rb
logster-1.0.0.1.pre test/logster/middleware/test_reporter.rb
logster-1.0.0.0.pre test/logster/middleware/test_reporter.rb
logster-0.9.9 test/logster/middleware/test_reporter.rb
logster-0.8.4.8.pre test/logster/middleware/test_reporter.rb