Skip to content

Commit

Permalink
Test case should check entity instance.
Browse files Browse the repository at this point in the history
  • Loading branch information
antonkomarev authored and cmgmyr committed Feb 25, 2016
1 parent ff1d226 commit f6048ee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/MessagableTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
}
}

Expand Down

0 comments on commit f6048ee

Please sign in to comment.