Page MenuHomeDevCentral

D263.id613.diff
No OneTemporary

D263.id613.diff

diff --git a/tests/Http/Controllers/GitHubGateControllerTest.php b/tests/Http/Controllers/GitHubGateControllerTest.php
--- a/tests/Http/Controllers/GitHubGateControllerTest.php
+++ b/tests/Http/Controllers/GitHubGateControllerTest.php
@@ -52,8 +52,44 @@
'/gate/GitHub/Quux', // A gate not existing in data/credentials.json
"",
'POST',
- []
+ [
+ 'X-Github-Delivery' => 'e5dd9fc7-17ac-11e5-9427-73dad6b9b17c',
+ ]
+ );
+ $this->assertResponseStatus(400);
+
+ $this->sendPayload(
+ '/gate/GitHub/Quux', // A gate not existing in data/credentials.json
+ "",
+ 'POST',
+ [
+ 'X-Github-Event' => 'ping',
+ ]
);
$this->assertResponseStatus(400);
+
+ $this->sendPayload(
+ '/gate/GitHub/Quux', // A gate not existing in data/credentials.json
+ "",
+ 'POST',
+ [
+ 'X-Github-Delivery' => 'e5dd9fc7-17ac-11e5-9427-73dad6b9b17c',
+ 'X-Github-Event' => 'ping',
+ ]
+ );
+ $this->assertResponseStatus(400);
+ }
+
+ public function testEmptySignature () {
+ $this->sendPayload(
+ '/gate/GitHub/Acme', // A gate existing in data/credentials.json
+ "",
+ 'POST',
+ [
+ 'X-Github-Event' => 'ping',
+ 'X-Github-Delivery' => 'e5dd9fc7-17ac-11e5-9427-73dad6b9b17c',
+ ]
+ );
+ $this->assertResponseStatus(403);
}
}

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 25, 01:34 (20 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2261294
Default Alt Text
D263.id613.diff (1 KB)

Event Timeline