Skip to content

Commit 2ee2c38

Browse files
authored
Remove unused variables from test stubs (#1480)
1 parent b360d9f commit 2ee2c38

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+62
-62
lines changed

stubs/pest-tests/inertia/ApiTokenPermissionsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
'abilities' => ['create', 'read'],
1818
]);
1919

20-
$response = $this->put('/user/api-tokens/'.$token->id, [
20+
$this->put('/user/api-tokens/'.$token->id, [
2121
'name' => $token->name,
2222
'permissions' => [
2323
'delete',

stubs/pest-tests/inertia/BrowserSessionsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
use App\Models\User;
44

55
test('other browser sessions can be logged out', function () {
6-
$this->actingAs($user = User::factory()->create());
6+
$this->actingAs(User::factory()->create());
77

88
$response = $this->delete('/user/other-browser-sessions', [
99
'password' => 'password',

stubs/pest-tests/inertia/CreateApiTokenTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
$this->actingAs($user = User::factory()->create());
1111
}
1212

13-
$response = $this->post('/user/api-tokens', [
13+
$this->post('/user/api-tokens', [
1414
'name' => 'Test Token',
1515
'permissions' => [
1616
'read',

stubs/pest-tests/inertia/CreateTeamTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
test('teams can be created', function () {
66
$this->actingAs($user = User::factory()->withPersonalTeam()->create());
77

8-
$response = $this->post('/teams', [
8+
$this->post('/teams', [
99
'name' => 'Test Team',
1010
]);
1111

stubs/pest-tests/inertia/DeleteAccountTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
test('user accounts can be deleted', function () {
77
$this->actingAs($user = User::factory()->create());
88

9-
$response = $this->delete('/user', [
9+
$this->delete('/user', [
1010
'password' => 'password',
1111
]);
1212

@@ -18,7 +18,7 @@
1818
test('correct password must be provided before account can be deleted', function () {
1919
$this->actingAs($user = User::factory()->create());
2020

21-
$response = $this->delete('/user', [
21+
$this->delete('/user', [
2222
'password' => 'wrong-password',
2323
]);
2424

stubs/pest-tests/inertia/DeleteApiTokenTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
'abilities' => ['create', 'read'],
1818
]);
1919

20-
$response = $this->delete('/user/api-tokens/'.$token->id);
20+
$this->delete('/user/api-tokens/'.$token->id);
2121

2222
expect($user->fresh()->tokens)->toHaveCount(0);
2323
})->skip(function () {

stubs/pest-tests/inertia/DeleteTeamTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
$otherUser = User::factory()->create(), ['role' => 'test-role']
1515
);
1616

17-
$response = $this->delete('/teams/'.$team->id);
17+
$this->delete('/teams/'.$team->id);
1818

1919
expect($team->fresh())->toBeNull();
2020
expect($otherUser->fresh()->teams)->toHaveCount(0);
@@ -23,7 +23,7 @@
2323
test('personal teams cant be deleted', function () {
2424
$this->actingAs($user = User::factory()->withPersonalTeam()->create());
2525

26-
$response = $this->delete('/teams/'.$user->currentTeam->id);
26+
$this->delete('/teams/'.$user->currentTeam->id);
2727

2828
expect($user->currentTeam->fresh())->not->toBeNull();
2929
});

stubs/pest-tests/inertia/InviteTeamMemberTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
$this->actingAs($user = User::factory()->withPersonalTeam()->create());
1212

13-
$response = $this->post('/teams/'.$user->currentTeam->id.'/members', [
13+
$this->post('/teams/'.$user->currentTeam->id.'/members', [
1414
'email' => '[email protected]',
1515
'role' => 'admin',
1616
]);
@@ -32,7 +32,7 @@
3232
'role' => 'admin',
3333
]);
3434

35-
$response = $this->delete('/team-invitations/'.$invitation->id);
35+
$this->delete('/team-invitations/'.$invitation->id);
3636

3737
expect($user->currentTeam->fresh()->teamInvitations)->toHaveCount(0);
3838
})->skip(function () {

stubs/pest-tests/inertia/LeaveTeamTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
$this->actingAs($otherUser);
1313

14-
$response = $this->delete('/teams/'.$user->currentTeam->id.'/members/'.$otherUser->id);
14+
$this->delete('/teams/'.$user->currentTeam->id.'/members/'.$otherUser->id);
1515

1616
expect($user->currentTeam->fresh()->users)->toHaveCount(0);
1717
});

stubs/pest-tests/inertia/ProfileInformationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
test('profile information can be updated', function () {
66
$this->actingAs($user = User::factory()->create());
77

8-
$response = $this->put('/user/profile-information', [
8+
$this->put('/user/profile-information', [
99
'name' => 'Test Name',
1010
'email' => '[email protected]',
1111
]);

0 commit comments

Comments
 (0)