Skip to content

Commit

Permalink
Add another unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
distantnative committed Sep 24, 2024
1 parent 803c1b0 commit 30d7946
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/Panel/Areas/UsersDialogsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,26 @@ public function testCreate(): void
$this->assertSame('admin', $props['value']['role']);
}

public function testCreateWithRoleQuery(): void
{
$this->app = $this->app->clone([
'request' => [
'query' => [
'role' => 'editor',
]
]
]);

$this->installEditor();
$this->login();

$dialog = $this->dialog('users/create');
$props = $dialog['props'];

$this->assertFormDialog($dialog);
$this->assertSame('editor', $props['value']['role']);
}

public function testCreateOnSubmit(): void
{
$this->submit([
Expand Down

0 comments on commit 30d7946

Please sign in to comment.