Failing test - JSON serialization shouldn't merge base opts into include opts.
This commit is contained in:
parent
5083d70f6f
commit
294e2a8c2e
@ -161,6 +161,15 @@ def test_includes_fetches_nth_level_associations
|
||||
assert_match %r{"tag":\{"name":"General"\}}, json
|
||||
end
|
||||
|
||||
def test_includes_doesnt_merge_opts_from_base
|
||||
json = @david.to_json(
|
||||
:only => :id,
|
||||
:include => :posts
|
||||
)
|
||||
|
||||
assert_match %{"title":"Welcome to the weblog"}, json
|
||||
end
|
||||
|
||||
def test_should_not_call_methods_on_associations_that_dont_respond
|
||||
def @david.favorite_quote; "Constraints are liberating"; end
|
||||
json = @david.to_json(:include => :posts, :methods => :favorite_quote)
|
||||
|
Loading…
Reference in New Issue
Block a user