Skip to content

Commit

Permalink
remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
ildyria committed Dec 16, 2024
1 parent 2bc425b commit 9642085
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
1 change: 0 additions & 1 deletion routes/api_v2.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@
Route::get('/Maintenance::jobs', [Admin\Maintenance\FixJobs::class, 'check']);
Route::post('/Maintenance::jobs', [Admin\Maintenance\FixJobs::class, 'do']);
Route::get('/Maintenance::tree', [Admin\Maintenance\FixTree::class, 'check']);
Route::post('/Maintenance::tree', [Admin\Maintenance\FixTree::class, 'do']);
Route::get('/Maintenance::genSizeVariants', [Admin\Maintenance\GenSizeVariants::class, 'check']);
Route::post('/Maintenance::genSizeVariants', [Admin\Maintenance\GenSizeVariants::class, 'do']);
Route::get('/Maintenance::missingFileSize', [Admin\Maintenance\MissingFileSizes::class, 'check']);
Expand Down
9 changes: 0 additions & 9 deletions tests/Feature_v2/Maintenance/TreeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,17 @@ public function testGuest(): void
{
$response = $this->getJsonWithData('Maintenance::tree', []);
$this->assertUnauthorized($response);

$response = $this->postJson('Maintenance::tree');
$this->assertUnauthorized($response);
}

public function testUser(): void
{
$response = $this->actingAs($this->userLocked)->getJsonWithData('Maintenance::tree');
$this->assertForbidden($response);

$response = $this->actingAs($this->userLocked)->postJson('Maintenance::tree');
$this->assertForbidden($response);
}

public function testAdmin(): void
{
$response = $this->actingAs($this->admin)->getJsonWithData('Maintenance::tree');
$this->assertOk($response);

$response = $this->actingAs($this->admin)->postJson('Maintenance::tree');
$this->assertOk($response);
}
}

0 comments on commit 9642085

Please sign in to comment.