Sha256: 54dcc4ecdb808d749238af8f24d11bf3462eafc9a4aff68e8c0957f0afa32720

Contents?: true

Size: 615 Bytes

Versions: 15

Compression:

Stored size: 615 Bytes

Contents

require 'test_helper'
require 'active_support/log_subscriber/test_helper'
require 'cassandra_object/log_subscriber'

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

  def setup
    super

    CassandraObject::LogSubscriber.attach_to :cassandra_object
  end

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

    wait

    assert_match 'SELECT * FROM Issues', @logger.logged(:debug).last
  end

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

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
extendi-cassandra_object-1.1.1 test/unit/log_subscriber_test.rb
extendi-cassandra_object-1.1.0 test/unit/log_subscriber_test.rb
extendi-cassandra_object-1.0.20 test/unit/log_subscriber_test.rb
extendi-cassandra_object-1.0.19 test/unit/log_subscriber_test.rb
extendi-cassandra_object-1.0.18 test/unit/log_subscriber_test.rb
extendi-cassandra_object-1.0.17 test/unit/log_subscriber_test.rb
extendi-cassandra_object-1.0.16 test/unit/log_subscriber_test.rb
extendi-cassandra_object-1.0.15 test/unit/log_subscriber_test.rb
extendi-cassandra_object-1.0.14 test/unit/log_subscriber_test.rb
extendi-cassandra_object-1.0.13 test/unit/log_subscriber_test.rb
extendi-cassandra_object-1.0.12 test/unit/log_subscriber_test.rb
extendi-cassandra_object-1.0.11 test/unit/log_subscriber_test.rb
extendi-cassandra_object-1.0.10 test/unit/log_subscriber_test.rb
extendi-cassandra_object-1.0.9 test/unit/log_subscriber_test.rb
extendi-cassandra_object-1.0.8 test/unit/log_subscriber_test.rb