mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-28 16:54:16 +00:00
Add test for settingcredit and rate
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Tests\TestCase;
|
||||
use Illuminate\Foundation\Testing\WithFaker;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use App\User;
|
||||
use App\SettingCredit;
|
||||
use App\Role;
|
||||
use Artisan;
|
||||
|
||||
class SettingCreditTest extends TestCase
|
||||
{
|
||||
protected $user;
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
Artisan::call('db:seed');
|
||||
|
||||
$this->user = factory(User::class)->create();
|
||||
$this->user->attachRole(Role::Where('name','admin')->first());
|
||||
}
|
||||
|
||||
public function testStore(){
|
||||
$this->actingAs($this->user)
|
||||
->postJson('/api/setting-credit/', [
|
||||
'rmb_credit_limit' => '5000',
|
||||
'usd_credit_limit' => '2000'
|
||||
])
|
||||
->assertStatus(201);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user