# RequestSpecでJSONの中身を検証
json = JSON.parse(response.body)
json.each do |data|
keys = data.keys
expect(keys).to match_array(['id', 'title', 'body'])
expect(data['id']).to eq(1)
expect(data['title']).to eq('タイトル')
end
More than 5 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme
List of users who liked
33