diff --git a/src/Events/MessagingAccountLinking.php b/src/Events/MessagingAccountLinking.php new file mode 100644 index 0000000..4550968 --- /dev/null +++ b/src/Events/MessagingAccountLinking.php @@ -0,0 +1,16 @@ +assertSame('messaging_reads', $event->getName()); } + /** @test */ + public function it_calls_account_linking_event() + { + $request = '{"object":"page","entry":[{"id":"111899832631525","time":1480279487271,"messaging":[{"sender":{"id":"USER_ID"},"recipient":{"id":"PAGE_ID"},"timestamp":1458668856463,"account_linking":{"status":"linked","authorization_code":"authorization code"}}]}]}'; + $driver = $this->getDriver($request); + + $event = $driver->hasMatchingEvent(); + $this->assertInstanceOf(MessagingAccountLinking::class, $event); + $this->assertSame('messaging_account_linking', $event->getName()); + } + /** @test */ public function it_calls_checkout_update_event() {