Sha256: b32ac599ea4a12451d15b9eb6fa2140479e6fb64de6154e999541c624cf6542b
Contents?: true
Size: 653 Bytes
Versions: 1
Compression:
Stored size: 653 Bytes
Contents
require 'json/api' class AcceptanceTest < MiniTest::Unit::TestCase def test_homepage_id_style json = <<-JSON { "posts": [{ "id": "1", "title": "Rails is Omakase", "links": { "author": "9", "comments": [ "5", "12", "17", "20" ] } }] } JSON assert JSON::Api.parse(json), "failed to parse" end def test_homepage_url_style json = <<-JSON { "posts": [{ "id": "1", "title": "Rails is Omakase", "links": { "author": "http://example.com/people/1", "comments": "http://example.com/comments/5,12,17,20" } }] } JSON assert JSON::Api.parse(json), "failed to parse" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
json-api-0.1.0 | test/acceptance_test.rb |