mirror of
https://github.com/github/rails.git
synced 2026-01-28 15:58:03 -05:00
Test for each JSON fragment to workaround assumed hash ordering.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7751 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -163,7 +163,10 @@ class DatabaseConnectedJsonEncodingTest < Test::Unit::TestCase
|
||||
}
|
||||
)
|
||||
|
||||
assert_equal %([{"name": "David", "posts": [{"id": 1}, {"id": 2}, {"id": 4}, {"id": 5}, {"id": 6}]}, {"name": "Mary", "posts": [{"id": 7}]}]), json
|
||||
['"name": "David"', '"posts": [', '{"id": 1}', '{"id": 2}', '{"id": 4}',
|
||||
'{"id": 5}', '{"id": 6}', '"name": "Mary"', '"posts": [{"id": 7}]'].each do |fragment|
|
||||
assert json.include?(fragment), json
|
||||
end
|
||||
end
|
||||
|
||||
def test_should_allow_options_for_hash_of_authors
|
||||
|
||||
Reference in New Issue
Block a user