Page MenuHomeDevCentral

D197.id468.diff
No OneTemporary

D197.id468.diff

diff --git a/tests/Http/PayloadFullTest.php b/tests/Http/PayloadFullTest.php
new file mode 100644
--- /dev/null
+++ b/tests/Http/PayloadFullTest.php
@@ -0,0 +1,28 @@
+<?php
+
+namespace Nasqueron\Notifications\Tests;
+
+class PayloadFullTest extends TestCase {
+ /**
+ * Tests a GitHub gate payload.
+ */
+ public function testPost () {
+ $payload = file_get_contents(__DIR__ . '/../data/GitHubPingPayload.json');
+ $this->sendPayload(
+ '/gate/GitHub/Quux',
+ $payload,
+ 'POST',
+ [
+ 'X-Github-Event' => 'ping',
+ 'X-Github-Delivery' => 'e5dd9fc7-17ac-11e5-9427-73dad6b9b17c'
+ ]
+ )
+ ->seeJson([
+ 'gate' => 'GitHub',
+ 'door' => 'Quux',
+ 'action' => 'AMQPAction'
+ ]);
+
+ $this->assertResponseOk();
+ }
+}

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 20, 10:11 (21 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2307950
Default Alt Text
D197.id468.diff (892 B)

Event Timeline