aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters/postgresql/array_test.rb
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2013-10-30 00:50:36 -0700
committerYves Senn <yves.senn@gmail.com>2013-10-30 00:50:36 -0700
commit609bc40904638663f92ca44ad05e8c95f87aa16b (patch)
tree8e9b9c7fcce9add3c5a35e451a26031e5f2466b7 /activerecord/test/cases/adapters/postgresql/array_test.rb
parenta5e2800221b29eb5b2a3f3b831e6bc8ce4e7d534 (diff)
parent510601ce8e6f95b47646e61d6e366245fbb5a329 (diff)
downloadrails-609bc40904638663f92ca44ad05e8c95f87aa16b.tar.gz
rails-609bc40904638663f92ca44ad05e8c95f87aa16b.tar.bz2
rails-609bc40904638663f92ca44ad05e8c95f87aa16b.zip
Merge pull request #12653 from releu/short_arrays_in_inspect
Short arrays in record.inspect
Diffstat (limited to 'activerecord/test/cases/adapters/postgresql/array_test.rb')
-rw-r--r--activerecord/test/cases/adapters/postgresql/array_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/array_test.rb b/activerecord/test/cases/adapters/postgresql/array_test.rb
index ecdbefcd03..9536cceb1d 100644
--- a/activerecord/test/cases/adapters/postgresql/array_test.rb
+++ b/activerecord/test/cases/adapters/postgresql/array_test.rb
@@ -113,6 +113,11 @@ class PostgresqlArrayTest < ActiveRecord::TestCase
assert_equal(PgArray.last.tags, tag_values)
end
+ def test_attribute_for_inspect_for_array_field
+ record = PgArray.new { |a| a.ratings = (1..11).to_a }
+ assert_equal("[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ...]", record.attribute_for_inspect(:ratings))
+ end
+
private
def assert_cycle field, array
# test creation