Commit 372d94ba authored by Viral Solani's avatar Viral Solani

Unit test cases for Role

parent cc559d77
...@@ -31,13 +31,5 @@ ...@@ -31,13 +31,5 @@
<env name="SESSION_DRIVER" value="array"/> <env name="SESSION_DRIVER" value="array"/>
<env name="QUEUE_DRIVER" value="sync"/> <env name="QUEUE_DRIVER" value="sync"/>
<env name="SCOUT_DRIVER" value="null"/> <env name="SCOUT_DRIVER" value="null"/>
</php> </php>
<!-- <testsuites>
<testsuite name="Application Test Suite">
<directory suffix="Test.php">
./tests
</directory>
</testsuite>
</testsuites> -->
</phpunit> </phpunit>
<?php
namespace Tests\Feature\Backend;
use App\Models\Access\Permission\Permission;
use App\Models\Access\Role\Role;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\Facades\Notification;
use Tests\TestCase;
class ManageRolesTest extends TestCase
{
}
<?php
namespace Tests\Unit\Models;
use Tests\TestCase;
class RoleTest extends TestCase
{
/** @test */
public function a_role_has_users()
{
$this->assertInstanceOf(
'Illuminate\Database\Eloquent\Collection', $this->adminRole->users
);
}
/** @test */
public function a_role_has_permissions()
{
$this->assertInstanceOf(
'Illuminate\Database\Eloquent\Collection', $this->adminRole->permissions
);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment