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-0.8.4.7.pre test/logster/middleware/test_reporter.rb
logster-0.8.4.6.pre test/logster/middleware/test_reporter.rb
logster-0.8.4.5.pre test/logster/middleware/test_reporter.rb
logster-0.8.4.4.pre test/logster/middleware/test_reporter.rb
logster-0.8.4.3.pre test/logster/middleware/test_reporter.rb
logster-0.8.4.2.pre test/logster/middleware/test_reporter.rb
logster-0.8.4.1.pre test/logster/middleware/test_reporter.rb
logster-0.8.4.pre test/logster/middleware/test_reporter.rb
logster-0.8.3 test/logster/middleware/test_reporter.rb
logster-0.8.2 test/logster/middleware/test_reporter.rb
logster-0.8.1 test/logster/middleware/test_reporter.rb
logster-0.8.0 test/logster/middleware/test_reporter.rb
logster-0.1.8 test/logster/middleware/test_reporter.rb
logster-0.1.7 test/logster/middleware/test_reporter.rb
logster-0.1.6 test/logster/middleware/test_reporter.rb
logster-0.1.5 test/logster/middleware/test_reporter.rb
logster-0.1.4 test/logster/middleware/test_reporter.rb
logster-0.1.3 test/logster/middleware/test_reporter.rb
logster-0.1.2 test/logster/middleware/test_reporter.rb
logster-0.1.1 test/logster/middleware/test_reporter.rb