-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Add support for testing JSON responses and validate JSON structures, see: https://codeception.com/docs/10-WebServices and https://codeception.com/docs/modules/REST#seeResponseMatchesJsonType
class PingCest
{
public function testPing(AcceptanceTester $I)
{
$query = 'query{ping {response}}';
$I->sendGraphQL($query);
$I->seeResponseMatchesJsonType ([
'response' => 'string',
], '$.ping[*]'
]);
$I->seeResponseContainsJson([
'ping' => [
'response' => 'pong',
]
]);
}
}leocavalcante
Metadata
Metadata
Assignees
Labels
No labels