Skip to content

Commit

Permalink
improve the test
Browse files Browse the repository at this point in the history
BSN4 committed Mar 30, 2020
1 parent 67811c2 commit 1295255
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/KabsaTest.php
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@
use Awssat\Kabsa\Traits\KabsaRelationships;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Redis;
use Orchestra\Testbench\TestCase;

@@ -26,6 +27,8 @@ public function setUp(): void
/** @test * */
public function first_test()
{
DB::enableQueryLog();

$user = User::create(['name' => 'hi']);

// Grab a Role.
@@ -37,6 +40,7 @@ public function first_test()
$this->assertEquals('admin', $user->role->label);
$this->assertEquals(3, Role::count());
$this->assertEquals('admin', Role::first()->label);
$this->assertCount(1, DB::getQueryLog());
}

/** @test * */

0 comments on commit 1295255

Please sign in to comment.