Skip to content

Commit

Permalink
fix mistake & test
Browse files Browse the repository at this point in the history
  • Loading branch information
emmachughes committed Nov 13, 2023
1 parent c3c7576 commit 4812174
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion sourcecode/hub/app/Providers/AuthServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function boot(): void
Gate::define('reset-password', function (User|null $user) {
$features = app()->make(Features::class);

return $features->isSignupEnabled();
return $features->isForgotPasswordEnabled();
});
}
}
8 changes: 4 additions & 4 deletions sourcecode/hub/tests/Feature/UserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ public function testSignupsAreUsuallyEnabled(): void

public function testSignupCanBeDisabled(): void
{
config(['features.sign-up' => false]);
config()->set('features.sign-up', false);

$this->get('/register')->assertNotFound();
$this->get('/register')->assertForbidden();
}

public function testForgotPasswordIsUsuallyEnabled(): void
Expand All @@ -36,9 +36,9 @@ public function testForgotPasswordIsUsuallyEnabled(): void

public function testForgotPasswordCanBeDisabled(): void
{
config(['features.forgot-password' => false]);
config()->set('features.forgot-password', false);

$this->get('/forgot-password')->assertNotFound();
$this->get('/forgot-password')->assertForbidden();
}

public function testSerialisation(): void
Expand Down

0 comments on commit 4812174

Please sign in to comment.