Skip to content

Commit

Permalink
Don't test disconnect! if in memory db
Browse files Browse the repository at this point in the history
`disconnect!` will lose all tables and fixtures if in memory db.
  • Loading branch information
kamipo committed Mar 9, 2019
1 parent f6ad0d8 commit 628d3c2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions activerecord/test/cases/adapter_test.rb
Expand Up @@ -456,15 +456,15 @@ def setup
@connection = ActiveRecord::Base.connection
end

test "reconnect after a disconnect" do
assert_predicate @connection, :active?
@connection.disconnect!
assert_not_predicate @connection, :active?
@connection.reconnect!
assert_predicate @connection, :active?
end

unless in_memory_db?
test "reconnect after a disconnect" do
assert_predicate @connection, :active?
@connection.disconnect!
assert_not_predicate @connection, :active?
@connection.reconnect!
assert_predicate @connection, :active?
end

test "transaction state is reset after a reconnect" do
@connection.begin_transaction
assert_predicate @connection, :transaction_open?
Expand Down

0 comments on commit 628d3c2

Please sign in to comment.