mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-19 04:14:04 +00:00
Approved user bankslip
This commit is contained in:
@@ -14,11 +14,13 @@ use Auth;
|
||||
use Artisan;
|
||||
use App\User;
|
||||
use App\Booking;
|
||||
use App\UserBankSlip;
|
||||
|
||||
class BookingTest extends TestCase
|
||||
{
|
||||
protected $user;
|
||||
protected $booking;
|
||||
protected $userBankSlip;
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
@@ -28,6 +30,10 @@ class BookingTest extends TestCase
|
||||
$this->booking = factory(Booking::class)->create([
|
||||
'user_id' => $this->user->id
|
||||
]);
|
||||
$this->userBankSlip = factory(UserBankSlip::class)->create([
|
||||
'book_id' => $this->booking->id
|
||||
]);
|
||||
|
||||
}
|
||||
|
||||
public function testPost()
|
||||
@@ -104,4 +110,11 @@ class BookingTest extends TestCase
|
||||
->json('POST','/api/booking/' . $this->booking->id . '/cancel', [])
|
||||
->assertSuccessful();
|
||||
}
|
||||
|
||||
public function testApproveBankSlip()
|
||||
{
|
||||
$this->actingAs($this->user)
|
||||
->json('POST','/api/booking/' . $this->booking->id . '/approve-bank-slip', [])
|
||||
->assertSuccessful();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user