diff --git a/tests/MessagableTraitTest.php b/tests/MessagableTraitTest.php index 24a9600..02f0ef0 100644 --- a/tests/MessagableTraitTest.php +++ b/tests/MessagableTraitTest.php @@ -3,6 +3,7 @@ namespace Cmgmyr\Messenger\Test; use Carbon\Carbon; +use Cmgmyr\Messenger\Models\Thread; use Cmgmyr\Messenger\Traits\Messagable; use Illuminate\Database\Eloquent\Model as Eloquent; @@ -61,8 +62,8 @@ public function it_should_get_participant_threads() $user_2 = $this->faktory->build('participant', ['user_id' => 2]); $thread->participants()->saveMany([$user_1, $user_2]); - $threadsCount = $user->threads->count(); - $this->assertEquals(1, $threadsCount); + $firstThread = $user->threads->first(); + $this->assertInstanceOf(Thread::class, $firstThread); } }