Skip to content

Commit

Permalink
feat: tried solved test error in the pipeline.
Browse files Browse the repository at this point in the history
  • Loading branch information
victore13 committed Sep 18, 2024
1 parent b28309e commit d76db0b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
26 changes: 13 additions & 13 deletions src/Commands/OAuthCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,27 +46,27 @@ public function handle(): int

protected function setConfigVariables(): void
{
$modelName = text(
label: 'Model name Authenticatable:',
placeholder: 'E.g. app/Models/User',
default: 'app/Models/User',
validate: fn (string $value) => $this->modelNameValidation($value),
);

// $guardName = text(
// label: 'Main guard name:',
// placeholder: 'E.g. web',
// default: 'web',
// $modelName = text(
// label: 'Model name Authenticatable:',
// placeholder: 'E.g. app/Models/User',
// default: 'app/Models/User',
// validate: fn (string $value) => $this->modelNameValidation($value),
// );

$guardName = text(
label: 'Main guard name:',
placeholder: 'E.g. web',
default: 'web',
);

// $loginRoute = text(
// label: 'Login route name:',
// placeholder: 'E.g. login',
// default: 'login',
// );

config()->set('oauth.user_model_name', $modelName);
// config()->set('oauth.guard_name', $guardName);
// config()->set('oauth.user_model_name', $modelName);
config()->set('oauth.guard_name', $guardName);
// config()->set('oauth.login_route_name', $loginRoute);
}

Expand Down
4 changes: 2 additions & 2 deletions tests/Feature/CommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
file_put_contents($tempFilePath, 'OAUTH_BASE_URL="https://test"');

$this->artisan('oauth:install')
->expectsQuestion('Model name Authenticatable:', TestUser::class)
// ->expectsQuestion('Main guard name:', 'web')
// ->expectsQuestion('Model name Authenticatable:', TestUser::class)
->expectsQuestion('Main guard name:', 'web')
// ->expectsQuestion('Login route name:', 'login')
// ->expectsQuestion('Oauth base url:', 'https://asgard.your.company')
// ->expectsQuestion('Oauth client ID:', 'CLIENTID')
Expand Down

0 comments on commit d76db0b

Please sign in to comment.