Skip to content

Commit

Permalink
test: fix flaky tests (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
asbiin authored Feb 18, 2024
1 parent 03195ba commit ce24da4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
|
*/

'faker_locale' => 'fr_FR',
'faker_locale' => 'en_US',

/*
|--------------------------------------------------------------------------
Expand Down
14 changes: 7 additions & 7 deletions tests/Feature/NameTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ public function name_letter_can_be_rendered(): void
{
$name = Name::factory()->create();

$response = $this->get('/prenoms/' . $name->name[0]);
$response = $this->get('/prenoms/' . Str::lower($name->name[0]));

$response->assertOk();
$response->assertSee('Tous les prénoms commençant par la lettre ' . Str::upper($name->name[0]));
$response->assertSee('Tous les prénoms commençant par la lettre ' . $name->name[0]);
$response->assertSee($name->name);
}

Expand All @@ -51,10 +51,10 @@ public function male_letter_can_be_rendered(): void
{
$name = Name::factory()->male()->create();

$response = $this->get('/prenoms/garcons/' . $name->name[0]);
$response = $this->get('/prenoms/garcons/' . Str::lower($name->name[0]));

$response->assertOk();
$response->assertSee('Tous les prénoms masculins commençant par la lettre ' . Str::upper($name->name[0]));
$response->assertSee('Tous les prénoms masculins commençant par la lettre ' . $name->name[0]);
$response->assertSee($name->name);
}

Expand All @@ -74,10 +74,10 @@ public function female_letter_can_be_rendered(): void
{
$name = Name::factory()->female()->create();

$response = $this->get('/prenoms/filles/' . $name->name[0]);
$response = $this->get('/prenoms/filles/' . Str::lower($name->name[0]));

$response->assertOk();
$response->assertSee('Tous les prénoms féminins commençant par la lettre ' . Str::upper($name->name[0]));
$response->assertSee('Tous les prénoms féminins commençant par la lettre ' . $name->name[0]);
$response->assertSee($name->name);
}

Expand All @@ -100,7 +100,7 @@ public function unisex_letter_can_be_rendered(): void
$response = $this->get("/prenoms/mixtes/{$name->name[0]}");

$response->assertOk();
$response->assertSee('Tous les prénoms mixtes commençant par la lettre ' . Str::upper($name->name[0]));
$response->assertSee('Tous les prénoms mixtes commençant par la lettre ' . $name->name[0]);
$response->assertSee($name->name);
}

Expand Down

0 comments on commit ce24da4

Please sign in to comment.