Skip to content

Commit

Permalink
Test user creation with admin role
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianallgeier committed Jul 10, 2019
1 parent 13f6dca commit 644fd2b
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion tests/Cms/Users/UserActionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,20 @@ public function testChangeRole()
$this->assertEquals('editor', $user->role());
}

public function testCreate()
public function testCreateAdmin()
{
$user = User::create([
'email' => 'new@domain.com',
'role' => 'admin',
]);

$this->assertTrue($user->exists());

$this->assertEquals('new@domain.com', $user->email());
$this->assertEquals('admin', $user->role());
}

public function testCreateEditor()
{
$user = User::create([
'email' => 'new@domain.com',
Expand Down

0 comments on commit 644fd2b

Please sign in to comment.