Add comprehensive test coverage and update notes
This commit is contained in:
@@ -87,3 +87,16 @@ it('bulk stores settings as admin', function (): void {
|
||||
'value' => 'Fast',
|
||||
]);
|
||||
});
|
||||
|
||||
it('bulk store forbids non-admin users', function (): void {
|
||||
$user = User::factory()->create();
|
||||
Sanctum::actingAs($user);
|
||||
|
||||
$response = $this->postJson('/api/settings/bulk', [
|
||||
'settings' => [
|
||||
['key' => 'site.name', 'value' => 'SpeedBB'],
|
||||
],
|
||||
]);
|
||||
|
||||
$response->assertStatus(403);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user