Skip to content

Commit

Permalink
Verify that #3690 has been closed by previous changes to the mysql
Browse files Browse the repository at this point in the history
adapters.

These tests fail on the v3.1.2 tag.

Closes #3690.
  • Loading branch information
jonleighton committed Nov 19, 2011
1 parent 89bbb6c commit 9c37416
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
4 changes: 4 additions & 0 deletions activerecord/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@

*Aaron Christy*

## Rails 3.1.3 (unreleased) ##

* Fix bug with referencing other mysql databases in set_table_name. *GH 3690*

## Rails 3.1.2 (unreleased) ##

* Fix bug with PostgreSQLAdapter#indexes. When the search path has multiple schemas, spaces
Expand Down
6 changes: 5 additions & 1 deletion activerecord/test/cases/adapters/mysql/schema_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def setup
table = Post.table_name
@db_name = db

@omgpost = Class.new(Post) do
@omgpost = Class.new(ActiveRecord::Base) do
set_table_name "#{db}.#{table}"
def self.name; 'Post'; end
end
Expand All @@ -23,6 +23,10 @@ def test_schema
assert @omgpost.find(:first)
end

def test_primary_key
assert_equal 'id', @omgpost.primary_key
end

def test_table_exists?
name = @omgpost.table_name
assert @connection.table_exists?(name), "#{name} table should exist"
Expand Down
6 changes: 5 additions & 1 deletion activerecord/test/cases/adapters/mysql2/schema_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def setup
table = Post.table_name
@db_name = db

@omgpost = Class.new(Post) do
@omgpost = Class.new(ActiveRecord::Base) do
set_table_name "#{db}.#{table}"
def self.name; 'Post'; end
end
Expand All @@ -23,6 +23,10 @@ def test_schema
assert @omgpost.find(:first)
end

def test_primary_key
assert_equal 'id', @omgpost.primary_key
end

def test_table_exists?
name = @omgpost.table_name
assert @connection.table_exists?(name), "#{name} table should exist"
Expand Down

0 comments on commit 9c37416

Please sign in to comment.