Page MenuHomeDevCentral

D263.diff
No OneTemporary

D263.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
Sun, Nov 24, 23:30 (21 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2261294
Default Alt Text
D263.diff (1 KB)

Event Timeline