Add event assertion for AuthController

This commit is contained in:
Pig Fang 2017-11-06 07:46:43 +08:00
parent c345b4dab3
commit 4d21fb5b02

View File

@ -407,6 +407,7 @@ class AuthControllerTest extends TestCase
'msg' => trans('auth.register.success'),
'redirect' => true
]);
$this->expectsEvents(Events\PlayerWasAdded::class);
$this->assertNotNull(\App\Models\Player::where('player_name', 'new_player')->first());
// Register with a duplicated player name