Skip to content

Commit

Permalink
Fix broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
jonleighton committed Oct 19, 2010
1 parent b00db54 commit 1f7415a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion activerecord/test/cases/json_serialization_test.rb
Expand Up @@ -181,7 +181,11 @@ def test_should_allow_only_option_for_list_of_authors
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
Expand Down

0 comments on commit 1f7415a

Please sign in to comment.