mirror of
https://gitlab.com/omair-personal/exchange.git
synced 2026-08-19 04:24:08 +00:00
add handle for exceed credit limit
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()
|
||||
|
||||
Reference in New Issue
Block a user