Skip to content

Commit 1295255

Browse files
committed
improve the test
1 parent 67811c2 commit 1295255

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/KabsaTest.php

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use Awssat\Kabsa\Traits\KabsaRelationships;
77
use Illuminate\Database\Eloquent\Model;
88
use Illuminate\Database\Schema\Blueprint;
9+
use Illuminate\Support\Facades\DB;
910
use Illuminate\Support\Facades\Redis;
1011
use Orchestra\Testbench\TestCase;
1112

@@ -26,6 +27,8 @@ public function setUp(): void
2627
/** @test * */
2728
public function first_test()
2829
{
30+
DB::enableQueryLog();
31+
2932
$user = User::create(['name' => 'hi']);
3033

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

4246
/** @test * */

0 commit comments

Comments
 (0)