Skip to content

Commit f6048ee

Browse files
antonkomarevcmgmyr
authored andcommitted
Test case should check entity instance.
1 parent ff1d226 commit f6048ee

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/MessagableTraitTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Cmgmyr\Messenger\Test;
44

55
use Carbon\Carbon;
6+
use Cmgmyr\Messenger\Models\Thread;
67
use Cmgmyr\Messenger\Traits\Messagable;
78
use Illuminate\Database\Eloquent\Model as Eloquent;
89

@@ -61,8 +62,8 @@ public function it_should_get_participant_threads()
6162
$user_2 = $this->faktory->build('participant', ['user_id' => 2]);
6263
$thread->participants()->saveMany([$user_1, $user_2]);
6364

64-
$threadsCount = $user->threads->count();
65-
$this->assertEquals(1, $threadsCount);
65+
$firstThread = $user->threads->first();
66+
$this->assertInstanceOf(Thread::class, $firstThread);
6667
}
6768
}
6869

0 commit comments

Comments
 (0)