mirror of
https://gitlab.com/omair-personal/exchange.git
synced 2026-08-19 04:24:08 +00:00
35 lines
725 B
PHP
35 lines
725 B
PHP
<?php
|
|
|
|
namespace Tests\Feature;
|
|
|
|
use Tests\TestCase;
|
|
use Illuminate\Foundation\Testing\WithFaker;
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
use App\User;
|
|
use App\Role;
|
|
use Artisan;
|
|
|
|
class MarkingTest 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(){
|
|
$response =
|
|
$this->actingAs($this->user)
|
|
->postJson('/api/marking/',[
|
|
'email' => 'user@example.com',
|
|
'marking' => 'markingcode123'
|
|
])
|
|
->assertStatus(201);
|
|
}
|
|
}
|