Sha256: d6620b3316eccb47ea1b3829026099cfdb6403cc18a25f142324f1a6264b8d16
Contents?: true
Size: 865 Bytes
Versions: 108
Compression:
Stored size: 865 Bytes
Contents
require 'test_helper' class CassandraObject::ConnectionTest < CassandraObject::TestCase class TestObject < CassandraObject::Base end test 'establish_connection' do TestObject.establish_connection( keyspace: TEST_KEYSPACE, servers: '192.168.0.100:9160', thrift: {'timeout' => 10} ) assert_not_equal CassandraObject::Base.connection, TestObject.connection assert_equal TEST_KEYSPACE, TestObject.connection.keyspace assert_equal ["192.168.0.100:9160"], TestObject.connection.servers assert_equal 10, TestObject.connection.thrift_client_options[:timeout] end test 'establish_connection defaults' do TestObject.establish_connection( keyspace: TEST_KEYSPACE ) assert_equal TEST_KEYSPACE, TestObject.connection.keyspace assert_equal ["127.0.0.1:9160"], TestObject.connection.servers end end
Version data entries
108 entries across 108 versions & 1 rubygems