Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions test/json_api_renderer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ def index
test "should render single model correctly in response to a application/vnd.api+json" do
get :show, :id => "1", :format => :json_api

response.body.must_equal "{\"song\":{\"name\":\"Bumi\"},\"links\":{\"self\":{\"href\":\"//self\"}}}"
response.body.must_equal "{\"songs\":{\"name\":\"Bumi\"},\"links\":{\"self\":{\"href\":\"//self\"}}}"
end

test "should render collection of models correctly in response to a application/vnd.api+json" do
get :index, :format => :json_api
# assert_body '{"people":[{"first_name":"Chad"},{"first_name":"Fremont"}]}'

response.body.must_equal "{\"song\":[{\"name\":\"Bumi\"},{\"name\":\"Chad\"}],\"links\":{\"self\":{\"href\":\"//self\"}}}"
response.body.must_equal "{\"songs\":[{\"name\":\"Bumi\"},{\"name\":\"Chad\"}],\"links\":{\"self\":{\"href\":\"//self\"}}}"
end

test "should have a content_type of application/vnd.api+json for a single model" do
Expand Down