Skip to content

Commit

Permalink
Test only
Browse files Browse the repository at this point in the history
  • Loading branch information
dbosen committed Nov 21, 2023
1 parent 37cdc44 commit 26febaf
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions modules/thunder_gqls/tests/src/Functional/SchemaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,28 @@ public function testExpiredImage(): void {
], $this->jsonDecode($response->getBody())['data']['page']);
}

/**
* Validates that non-existing entity links do not generate a warning.
*/
public function testNonExistingEntityLinks(): void {
$query = <<<GQL
query (\$path: String!) {
page(path: \$path) {
entityLinks {
versionHistory
}
}
}
GQL;

$variables = ['path' => 'news'];
$response = $this->query($query, Json::encode($variables));
$page = $this->jsonDecode($response->getBody());
$this->assertArrayNotHasKey('errors', $page);
$this->assertNull($page['data']['page']['entityLinks']['versionHistory']);

}

/**
* Validates the thunder schema.
*/
Expand Down

0 comments on commit 26febaf

Please sign in to comment.