Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.x] Adds support for Pest #866

Merged
merged 17 commits into from
Sep 8, 2021
Merged
Prev Previous commit
Next Next commit
Removes non needed underscores
  • Loading branch information
nunomaduro committed Aug 28, 2021
commit 58b1a2c7da73ef9e7cb390e96788ef3e893027a9
6 changes: 3 additions & 3 deletions stubs/pest-tests/AuthenticationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
use App\Models\User;
use App\Providers\RouteServiceProvider;

test('login_screen_can_be_rendered', function () {
test('login screen can be rendered', function () {
$response = $this->get('/login');

$response->assertStatus(200);
});

test('users_can_authenticate_using_the_login_screen', function () {
test('users can authenticate using the login screen', function () {
$user = User::factory()->create();

$response = $this->post('/login', [
Expand All @@ -21,7 +21,7 @@
$response->assertRedirect(RouteServiceProvider::HOME);
});

test('users_can_not_authenticate_with_invalid_password', function () {
test('users can not authenticate with invalid_password', function () {
$user = User::factory()->create();

$this->post('/login', [
Expand Down
8 changes: 4 additions & 4 deletions stubs/pest-tests/PasswordResetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Illuminate\Support\Facades\Notification;
use Laravel\Fortify\Features;

test('reset_password_link_screen_can_be_rendered', function () {
test('reset password link screen can be rendered', function () {
if (! Features::enabled(Features::updatePasswords())) {
return $this->markTestSkipped('Password updates are not enabled.');
}
Expand All @@ -15,7 +15,7 @@
$response->assertStatus(200);
});

test('reset_password_link_can_be_requested', function () {
test('reset password link can be requested', function () {
if (! Features::enabled(Features::updatePasswords())) {
return $this->markTestSkipped('Password updates are not enabled.');
}
Expand All @@ -31,7 +31,7 @@
Notification::assertSentTo($user, ResetPassword::class);
});

test('reset_password_screen_can_be_rendered', function () {
test('reset password screen can be rendered', function () {
if (! Features::enabled(Features::updatePasswords())) {
return $this->markTestSkipped('Password updates are not enabled.');
}
Expand All @@ -53,7 +53,7 @@
});
});

test('password_can_be_reset_with_valid_token', function () {
test('password can be reset with valid token', function () {
if (! Features::enabled(Features::updatePasswords())) {
return $this->markTestSkipped('Password updates are not enabled.');
}
Expand Down
6 changes: 3 additions & 3 deletions stubs/pest-tests/RegistrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use Laravel\Fortify\Features;
use Laravel\Jetstream\Jetstream;

test('registration_screen_can_be_rendered', function () {
test('registration screen can be rendered', function () {
if (! Features::enabled(Features::registration())) {
return $this->markTestSkipped('Registration support is not enabled.');
}
Expand All @@ -14,7 +14,7 @@
$response->assertStatus(200);
});

test('registration_screen_cannot_be_rendered_if_support_is_disabled', function () {
test('registration screen cannot be rendered if support is disabled', function () {
if (Features::enabled(Features::registration())) {
return $this->markTestSkipped('Registration support is enabled.');
}
Expand All @@ -24,7 +24,7 @@
$response->assertStatus(404);
});

test('new_users_can_register', function () {
test('new users can register', function () {
if (! Features::enabled(Features::registration())) {
return $this->markTestSkipped('Registration support is not enabled.');
}
Expand Down
2 changes: 1 addition & 1 deletion stubs/pest-tests/inertia/DeleteApiTokenTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use Illuminate\Support\Str;
use Laravel\Jetstream\Features;

test('api_tokens_can_be_deleted', function () {
test('api tokens can be deleted', function () {
if (! Features::hasApiFeatures()) {
return $this->markTestSkipped('API support is not enabled.');
}
Expand Down
2 changes: 1 addition & 1 deletion stubs/pest-tests/inertia/ProfileInformationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use App\Models\User;

test('profile_information_can_be_updated', function () {
test('profile information can be updated', function () {
$this->actingAs($user = User::factory()->create());

$response = $this->put('/user/profile-information', [
Expand Down