Implement dark mode, bug report page, and schema dump
This commit is contained in:
@@ -9,6 +9,7 @@ use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Foundation\Testing\WithFaker;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Spatie\Permission\Models\Permission;
|
||||
use Spatie\Permission\Models\Role;
|
||||
use Tests\TestCase;
|
||||
|
||||
@@ -29,12 +30,22 @@ class PaymentOrderWorkflowTest extends TestCase
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
Role::create(['name' => 'finance_accountant']);
|
||||
Role::create(['name' => 'finance_cashier']);
|
||||
$this->withoutMiddleware([\App\Http\Middleware\EnsureUserIsAdmin::class]);
|
||||
|
||||
Permission::findOrCreate('create_payment_order', 'web');
|
||||
Permission::findOrCreate('view_payment_orders', 'web');
|
||||
Permission::findOrCreate('verify_payment_order', 'web');
|
||||
Permission::findOrCreate('execute_payment', 'web');
|
||||
|
||||
Role::firstOrCreate(['name' => 'admin']);
|
||||
Role::firstOrCreate(['name' => 'finance_accountant']);
|
||||
Role::firstOrCreate(['name' => 'finance_cashier']);
|
||||
|
||||
$this->accountant = User::factory()->create(['email' => 'accountant@test.com']);
|
||||
$this->cashier = User::factory()->create(['email' => 'cashier@test.com']);
|
||||
|
||||
$this->accountant->assignRole('admin');
|
||||
$this->cashier->assignRole('admin');
|
||||
$this->accountant->assignRole('finance_accountant');
|
||||
$this->cashier->assignRole('finance_cashier');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user