Skip to content

Commit

Permalink
Fix user action usage /w entity (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek authored Dec 30, 2021
1 parent ce2f0b1 commit c0fc380
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Acl.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Atk4\Login;

use Atk4\Core\Exception;
use Atk4\Data\Exception;
use Atk4\Data\Model;

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/PasswordManagementTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function testBasic(): void
$this->assertTrue($model->hasUserAction('check_password_strength'));

// simply generate password and return it
$this->assertIsString($model->executeUserAction('generate_random_password', 8));
$this->assertIsString($model->createEntity()->executeUserAction('generate_random_password', 8));

// generate new password and set model record password field and save it and email if possible
$entity = $model->load(1);
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/SignupTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function testBasic(): void
$this->assertTrue($m->hasUserAction('register_new_user'));

// as result it makes model loaded (as entity) with new user record
$m->executeUserAction(
$m->createEntity()->executeUserAction(
'register_new_user',
[
'name' => 'New user',
Expand Down

0 comments on commit c0fc380

Please sign in to comment.