Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3771818
D263.id613.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D263.id613.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D263: Tests for GitHubGateController
Attached
Detach File
Event Timeline
Log In to Comment