Skip to content

Commit

Permalink
Merge pull request #49 from tienvx/test-missing-description
Browse files Browse the repository at this point in the history
test: Test missing description
  • Loading branch information
tienvx authored Mar 30, 2024
2 parents e30028e + f4d425d commit 0806fe1
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/Application/Controller/MessagesControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,23 @@ public function testInvalidProviderStateParams(): void
$this->assertStringContainsString("Invalid 'params' for provider state 'required state'.", $client->getResponse()->getContent());
}

public function testMissingDescription(): void
{
$client = static::createClient();
$client->request('POST', '/test-pact-messages', [], [], [], json_encode([
'providerStates' => [
[
'name' => 'required state',
'params' => [
'key' => 'value',
],
],
],
]));
$this->assertResponseStatusCodeSame(400);
$this->assertStringContainsString("'description' is missing or invalid in messages request.", $client->getResponse()->getContent());
}

public function testNoMessage(): void
{
$client = static::createClient();
Expand Down

0 comments on commit 0806fe1

Please sign in to comment.