Skip to content

Commit

Permalink
Fix testing migrations not working while running tests (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-de-wit authored Mar 20, 2024
1 parent 04bb07d commit 5ff99b5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions tests/Integration/AbstractIntegrationTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ protected function getPackageProviders($app): array
protected function defineDatabaseMigrations(): void
{
$this->loadLaravelMigrations();
$this->loadMigrationsFrom(__DIR__.'/../stubs/migrations');
}

/**
Expand Down
2 changes: 0 additions & 2 deletions tests/Integration/GraphQL/Mutations/LoginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ public function it_logs_a_user_in_using_custom_user_identifier(): void
$this->app['config']->set('auth.providers.users.model', UserHasApiTokensIdentifiedByUsername::class);
$this->app['config']->set('lighthouse-sanctum.user_identifier_field_name', 'username');

$this->loadMigrationsFrom('./tests/stubs/migrations');

UserHasApiTokensIdentifiedByUsername::factory()->create([
'username' => 'john.doe',
'password' => Hash::make('supersecret'),
Expand Down

0 comments on commit 5ff99b5

Please sign in to comment.