Skip to content
Browse files

Fix broken test

  • Loading branch information...
1 parent b00db54 commit 1f7415ab3a5b433ecfb0c10d66343a894d73914a @jonleighton jonleighton committed Oct 19, 2010
Showing with 5 additions and 1 deletion.
  1. +5 −1 activerecord/test/cases/json_serialization_test.rb
View
6 activerecord/test/cases/json_serialization_test.rb
@@ -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

0 comments on commit 1f7415a

Please sign in to comment.
Something went wrong with that request. Please try again.