Skip to content

Commit

Permalink
fixed notifications APIs unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alifaraun committed Aug 14, 2023
1 parent 6bfb7a1 commit b6e2e18
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/Feature/NotificationsAPITest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,12 @@ public function init_test_api_notifications_transaction($dispatched, $notdispatc

// load request from json to array
$data = json_decode(file_get_contents(__DIR__ . './../_fixtures/transactions/verfied.json'), true);
$body = array_merge($data, $extraData);

// call api notificaitons
$this->postJson(route(config('moamalat-pay.notification.route_name')), array_merge($data, $extraData))
//$this->postJson(route(config('moamalat-pay.notification.route_name')), $body)
//There is issuse with $this->postJson it sends body empty , that is why I use $this->withHeaders
$this->withHeaders([])->post(route(config('moamalat-pay.notification.route_name')), $body)
->assertStatus(200)
->assertJson(["Message" => 'Success', 'Success' => true]);

Expand Down

0 comments on commit b6e2e18

Please sign in to comment.