Sha256: 0f119118a53673353ba0dd244c472a110b136959212f03df202cdd2c86817930

Contents?: true

Size: 635 Bytes

Versions: 18

Compression:

Stored size: 635 Bytes

Contents

require "test_helper"
require "active_support/log_subscriber/test_helper"
require "superstore/log_subscriber"

class Superstore::LogSubscriberTest < Superstore::TestCase
  include ActiveSupport::LogSubscriber::TestHelper

  def setup
    super

    Superstore::LogSubscriber.attach_to :cassandra_object
  end

  def test_cql_notification
    Issue.adapter.execute "SELECT * FROM Issues"

    wait

    assert_equal 1, @logger.logged(:debug).size
    assert_match "SELECT * FROM Issues", @logger.logged(:debug)[0]
  end

  def test_initializes_runtime
    Thread.new { assert_equal 0, Superstore::LogSubscriber.runtime }.join
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
superstore-1.2.0 test/unit/log_subscriber_test.rb
superstore-1.1.4 test/unit/log_subscriber_test.rb
superstore-1.1.3 test/unit/log_subscriber_test.rb
superstore-1.1.2 test/unit/log_subscriber_test.rb
superstore-1.1.1 test/unit/log_subscriber_test.rb
superstore-1.1.0 test/unit/log_subscriber_test.rb
superstore-1.0.12 test/unit/log_subscriber_test.rb
superstore-1.0.11 test/unit/log_subscriber_test.rb
superstore-1.0.10 test/unit/log_subscriber_test.rb
superstore-1.0.9 test/unit/log_subscriber_test.rb
superstore-1.0.8 test/unit/log_subscriber_test.rb
superstore-1.0.7 test/unit/log_subscriber_test.rb
superstore-1.0.6 test/unit/log_subscriber_test.rb
superstore-1.0.5 test/unit/log_subscriber_test.rb
superstore-1.0.4 test/unit/log_subscriber_test.rb
superstore-1.0.3 test/unit/log_subscriber_test.rb
superstore-1.0.2 test/unit/log_subscriber_test.rb
superstore-1.0.0 test/unit/log_subscriber_test.rb