aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorMarcel Molina <marcel@vernix.org>2005-10-11 03:51:58 +0000
committerMarcel Molina <marcel@vernix.org>2005-10-11 03:51:58 +0000
commit31219f009cfbb1fb492f36522edc38eef667c01b (patch)
treeff4552065658811a92b213842e6ae143584e7512 /activerecord
parentcb8c8070850a5d7adbe4e456b154ddf8c8f90252 (diff)
downloadrails-31219f009cfbb1fb492f36522edc38eef667c01b.tar.gz
rails-31219f009cfbb1fb492f36522edc38eef667c01b.tar.bz2
rails-31219f009cfbb1fb492f36522edc38eef667c01b.zip
Add test coverage for content_columns. Closes #2432.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2532 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/CHANGELOG2
-rw-r--r--activerecord/test/reflection_test.rb5
2 files changed, 6 insertions, 1 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG
index 1abfaf9df5..c70882e01b 100644
--- a/activerecord/CHANGELOG
+++ b/activerecord/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Add test coverage for content_columns. #2432. [coffee2code]
+
* Speed up for unthreaded environments. #2431. [skaes@web.de]
* Optimization for Mysql selects using mysql-ruby extension greater than 2.6.3. #2426. [skaes@web.de]
diff --git a/activerecord/test/reflection_test.rb b/activerecord/test/reflection_test.rb
index 0935b7e5a2..c3117b8c5d 100644
--- a/activerecord/test/reflection_test.rb
+++ b/activerecord/test/reflection_test.rb
@@ -28,7 +28,10 @@ class ReflectionTest < Test::Unit::TestCase
end
def test_content_columns
- assert_equal 8, Topic.content_columns.length
+ content_columns = Topic.content_columns
+ content_column_names = content_columns.map {|column| column.name}
+ assert_equal 8, content_columns.length
+ assert_equal %w(title author_name author_email_address written_on bonus_time last_read content approved).sort, content_column_names.sort
end
def test_column_string_type_and_limit