Skip to content

Commit

Permalink
try fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Kaufmann committed Feb 16, 2022
1 parent 4c20e7c commit 261debf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/Feature/TeamworkTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Exception;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Event;
use Mockery as m;
use Mpociot\Teamwork\TeamInvite;
use Mpociot\Teamwork\TeamworkTeam;
Expand Down Expand Up @@ -261,7 +262,7 @@ public function testCanInviteToTeamWithoutCallback()

public function testInviteToTeamFiresEvent()
{
$this->expectsEvents(\Mpociot\Teamwork\Events\UserInvitedToTeam::class);
Event::fake();

auth()->login($this->user);

Expand All @@ -271,5 +272,7 @@ public function testInviteToTeamFiresEvent()

\Teamwork::inviteToTeam($email, $team, function ($invite) {
});

Event::assertDispatched(\Mpociot\Teamwork\Events\UserInvitedToTeam::class);
}
}

0 comments on commit 261debf

Please sign in to comment.