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