Slide 76
Slide 76 text
Ruby on Rails
describe 'GET /v1/chapters/:id/stories' do
before do
get api_v1_chapter_stories_path(chapter), params: params
end
it_behaves_like 'valid response'
it 'returns available chapters' do
json = JSON.parse(response.body)
hash = JSON.parse(serialized_json(chapter.stories))
expect(json).to match_array(hash)
end
end