You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.1 KiB
43 lines
1.1 KiB
<?php
|
|
|
|
namespace Tests\Unit\Policies;
|
|
|
|
use fullMstr;
|
|
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
|
use Tests\BrowserKitTest as TestCase;
|
|
|
|
class MasterPolicyTest extends TestCase
|
|
{
|
|
use DatabaseMigrations;
|
|
|
|
/** @test */
|
|
public function user_can_create_master()
|
|
{
|
|
$user = $this->createUser();
|
|
$this->assertTrue($user->can('create', new Master));
|
|
}
|
|
|
|
/** @test */
|
|
public function user_can_view_master()
|
|
{
|
|
$user = $this->createUser();
|
|
$singleMstr = factory(Master::class)->create();
|
|
$this->assertTrue($user->can('view', $singleMstr));
|
|
}
|
|
|
|
/** @test */
|
|
public function user_can_update_master()
|
|
{
|
|
$user = $this->createUser();
|
|
$singleMstr = factory(Master::class)->create();
|
|
$this->assertTrue($user->can('update', $singleMstr));
|
|
}
|
|
|
|
/** @test */
|
|
public function user_can_delete_master()
|
|
{
|
|
$user = $this->createUser();
|
|
$singleMstr = factory(Master::class)->create();
|
|
$this->assertTrue($user->can('delete', $singleMstr));
|
|
}
|
|
}
|