Adding a test the user token is correctly generated for the createWithRoles method

parent 5ae06f6d
......@@ -182,6 +182,19 @@ class SentinelUserRepositoryTest extends BaseUserTestCase
$this->assertCount(1, $this->user->all());
}
/** @test */
public function it_creates_a_user_token_when_creating_user_with_roles()
{
$this->createRole('User');
$user = $this->user->createWithRoles([
'email' => 'n.widart@gmail.com',
'password' => 'demo1234',
], ['User']);
$this->assertCount(1, $user->api_keys);
}
/** @test */
public function it_creates_user_without_triggering_events_for_cli()
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment