Skip to content

Commit eb590ae

Browse files
author
Lee Richmond
committed
enable 2 specs
1 parent daf986f commit eb590ae

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

spec/jsonapi_compliable_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ def index
167167

168168
get :index
169169
expect(json_included_types).to match_array(%w(books genres))
170-
#assert_record_payload(:book, author.book, json_include('stages'))
171-
#assert_record_payload(:stage_type, server.stage.type, json_include('stage_types'))
170+
assert_payload(:book, author.books[0], json_include('books'))
171+
assert_payload(:genre, author.books[0].genre, json_include('genres'))
172172
end
173173

174174
context 'when including relations' do

spec/spec_helper.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,3 +140,11 @@ class BookSerializer < ApplicationSerializer
140140
end
141141

142142
ActiveModel::Serializer.config.adapter = :json_api
143+
144+
JsonapiSpecHelpers::Payload.register(:book) do
145+
key(:title)
146+
end
147+
148+
JsonapiSpecHelpers::Payload.register(:genre) do
149+
key(:name)
150+
end

0 commit comments

Comments
 (0)