Skip to content

Commit

Permalink
Merge pull request #13478 from schneems/schneems/fix-mysql
Browse files Browse the repository at this point in the history
Move mysql2 test for when adapter will be loaded
  • Loading branch information
guilleiguaran committed Dec 25, 2013
2 parents 2aceccf + 8e2c080 commit 278bbfd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
7 changes: 0 additions & 7 deletions activerecord/test/cases/adapters/mysql/mysql_adapter_test.rb
Expand Up @@ -23,13 +23,6 @@ def test_bad_connection_mysql
end
end

def test_bad_connection_mysql2
assert_raise ActiveRecord::NoDatabaseError do
connection = ActiveRecord::Base.mysql2_connection(adapter: "mysql2", database: "should_not_exist-cinco-dog-db")
connection.exec_query('drop table if exists ex')
end
end

def test_valid_column
column = @conn.columns('ex').find { |col| col.name == 'id' }
assert @conn.valid_type?(column.type)
Expand Down
7 changes: 7 additions & 0 deletions activerecord/test/cases/adapters/mysql2/connection_test.rb
Expand Up @@ -13,6 +13,13 @@ def teardown
super
end

def test_bad_connection
assert_raise ActiveRecord::NoDatabaseError do
connection = ActiveRecord::Base.mysql2_connection(adapter: "mysql2", database: "should_not_exist-cinco-dog-db")
connection.exec_query('drop table if exists ex')
end
end

def test_no_automatic_reconnection_after_timeout
assert @connection.active?
@connection.update('set @@wait_timeout=1')
Expand Down

0 comments on commit 278bbfd

Please sign in to comment.