aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2010-10-19 16:26:35 +0100
committerJon Leighton <j@jonathanleighton.com>2010-10-19 16:26:35 +0100
commit1f7415ab3a5b433ecfb0c10d66343a894d73914a (patch)
tree12c9980fdfac18d4ea7ec7545af7133e90f572c5 /activerecord/test
parentb00db54e746ab0f1664d7f160b46beb49587b370 (diff)
downloadrails-1f7415ab3a5b433ecfb0c10d66343a894d73914a.tar.gz
rails-1f7415ab3a5b433ecfb0c10d66343a894d73914a.tar.bz2
rails-1f7415ab3a5b433ecfb0c10d66343a894d73914a.zip
Fix broken test
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/json_serialization_test.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/activerecord/test/cases/json_serialization_test.rb b/activerecord/test/cases/json_serialization_test.rb
index 430be003ac..8664d63e8f 100644
--- a/activerecord/test/cases/json_serialization_test.rb
+++ b/activerecord/test/cases/json_serialization_test.rb
@@ -181,7 +181,11 @@ class DatabaseConnectedJsonEncodingTest < ActiveRecord::TestCase
def test_should_allow_except_option_for_list_of_authors
ActiveRecord::Base.include_root_in_json = false
authors = [@david, @mary]
- assert_equal %([{"id":1},{"id":2}]), ActiveSupport::JSON.encode(authors, :except => [:name, :author_address_id, :author_address_extra_id])
+ encoded = ActiveSupport::JSON.encode(authors, :except => [
+ :name, :author_address_id, :author_address_extra_id,
+ :organization_id, :owned_essay_id
+ ])
+ assert_equal %([{"id":1},{"id":2}]), encoded
ensure
ActiveRecord::Base.include_root_in_json = true
end