mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-19 04:14:04 +00:00
Add eta
This commit is contained in:
@@ -16,12 +16,14 @@ use App\User;
|
||||
use App\Booking;
|
||||
use App\UserBankSlip;
|
||||
use App\Role;
|
||||
use App\SettingCredit;
|
||||
|
||||
class BookingTest extends TestCase
|
||||
{
|
||||
protected $user;
|
||||
protected $booking;
|
||||
protected $userBankSlip;
|
||||
protected $setting_credit;
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
@@ -29,6 +31,7 @@ class BookingTest extends TestCase
|
||||
Artisan::call('db:seed');
|
||||
|
||||
$this->user = factory(User::class)->create();
|
||||
$this->setting_credit = factory(SettingCredit::class)->create();
|
||||
$this->booking = factory(Booking::class)->create([
|
||||
'user_id' => $this->user->id
|
||||
]);
|
||||
@@ -67,8 +70,14 @@ class BookingTest extends TestCase
|
||||
'usd_book_cnap' => '2131rew',
|
||||
'usd_book_bank_branch' => '2131rew',
|
||||
'verification_status' => '1'
|
||||
])
|
||||
->assertStatus(201);
|
||||
]);
|
||||
|
||||
if(14000 > $this->setting_credit->rmb_credit_limit){
|
||||
$response->assertStatus(401);
|
||||
}
|
||||
else{
|
||||
$response->assertStatus(201);
|
||||
}
|
||||
}
|
||||
|
||||
public function testuploadbankslip()
|
||||
@@ -123,7 +132,9 @@ class BookingTest extends TestCase
|
||||
public function testApproveBankSlip()
|
||||
{
|
||||
$this->actingAs($this->user)
|
||||
->json('POST','/api/booking/' . $this->booking->id . '/approve-bank-slip', [])
|
||||
->json('POST','/api/booking/' . $this->booking->id . '/approve-bank-slip', [
|
||||
'estimated_arrival_time' => '6000'
|
||||
])
|
||||
->assertSuccessful();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user