Skip to content

Commit

Permalink
Merge pull request #18 from pinkary-project/test/change-to-assert-ok
Browse files Browse the repository at this point in the history
test: change to `assertOk`.
  • Loading branch information
nunomaduro authored Mar 21, 2024
2 parents 512ff10 + 4f82fab commit 9db57e0
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions tests/Http/ForgotPasswordTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
test('reset password link screen can be rendered', function () {
$response = $this->get('/forgot-password');

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

test('reset password link can be requested', function () {
Expand All @@ -32,7 +32,7 @@
Notification::assertSentTo($user, ResetPassword::class, function ($notification) {
$response = $this->get('/reset-password/'.$notification->token);

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

return true;
});
Expand Down
2 changes: 1 addition & 1 deletion tests/Http/HomeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
$response = $this->actingAs($user)
->get(route('home'));

$response->assertStatus(200)
$response->assertOk()
->assertSee('Home')
->assertSeeLivewire(Home::class);
});
2 changes: 1 addition & 1 deletion tests/Http/LoginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
test('guest', function () {
$response = $this->get('/login');

$response->assertStatus(200)
$response->assertOk()
->assertSee('Log In');
});

Expand Down
4 changes: 2 additions & 2 deletions tests/Http/Profile/Show/Questions/ShowTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
'question' => $question->id,
]));

$response->assertStatus(200)->assertSee([
$response->assertOk()->assertSee([
$question->content,
'This is the answer',
]);
Expand Down Expand Up @@ -76,7 +76,7 @@
'question' => $question->id,
]));

$response->assertStatus(200)
$response->assertOk()
->assertSee($question->content);
});

Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Livewire/Questions/CreateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
'toId' => $userB->id,
]);

$component->assertStatus(200)->assertSee('Ask a question...');
$component->assertOk()->assertSee('Ask a question...');
});

test('refreshes when link settings changes', function () {
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Livewire/Questions/IndexTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
'userId' => $user->id,
]);

$component->assertStatus(200);
$component->assertOk();
});

test('render with wrong user id', function () {
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Livewire/WelcomeUsersAvatarsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@

$component = Livewire::test(WelcomeUsersAvatars::class);

$component->assertStatus(200);
$component->assertOk();
});
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

$response = $this->get('/test');

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

test('auth with verified email', function () {
Expand All @@ -26,7 +26,7 @@

$response = $this->actingAs($user)->get('/test');

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

test('auth without verified email', function () {
Expand Down

0 comments on commit 9db57e0

Please sign in to comment.