Skip to content

Commit

Permalink
Test callback on finalized invoice
Browse files Browse the repository at this point in the history
  • Loading branch information
AJenbo committed Feb 8, 2018
1 parent d5842ac commit aeedfaa
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/Feature/Http/Controllers/PaymentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' => '[email protected]<My store>',
'to' => '[email protected]<John Doe>',
]
);
}

public function testCallbackWrong(): void
{
$this->get('/betaling/1/a4238/callback/?txnid=123456&paymenttype=1&hash=wrong')
Expand Down

0 comments on commit aeedfaa

Please sign in to comment.