diff --git a/tests/Feature/Http/Controllers/PaymentTest.php b/tests/Feature/Http/Controllers/PaymentTest.php index da88ddd7..ff5b1eff 100644 --- a/tests/Feature/Http/Controllers/PaymentTest.php +++ b/tests/Feature/Http/Controllers/PaymentTest.php @@ -355,6 +355,21 @@ public function testCallback(): void ); } + public function testCallbackFinalized(): void + { + $this->get('/betaling/3/bc87e/callback/?txnid=123456&paymenttype=1&hash=aaa42296669b958c3cee6c0475c8093e') + ->assertResponseStatus(200); + + $this->assertDatabaseMissing( + 'emails', + [ + 'subject' => 'Order #1 - payment completed', + 'from' => 'mail@gmail.com', + 'to' => 'test@gmail.com', + ] + ); + } + public function testCallbackWrong(): void { $this->get('/betaling/1/a4238/callback/?txnid=123456&paymenttype=1&hash=wrong')