Files
snipe-it/tests/Feature/Settings/AlertsSettingTest.php
T
Marcus Moore 9e4aab7165 Scaffold tests
2025-06-02 17:05:18 -07:00

44 lines
1.1 KiB
PHP

<?php
namespace Tests\Feature\Settings;
use Tests\TestCase;
use App\Models\User;
class AlertsSettingTest extends TestCase
{
public function testPermissionRequiredToViewAlertSettings()
{
$this->actingAs(User::factory()->create())
->get(route('settings.alerts.index'))
->assertForbidden();
}
public function testAdminCCEmailArrayCanBeSaved()
{
$response = $this->actingAs(User::factory()->superuser()->create())
->post(route('settings.alerts.save', ['alert_email' => 'me@example.com,you@example.com']))
->assertStatus(302)
->assertValid('alert_email')
->assertRedirect(route('settings.index'))
->assertSessionHasNoErrors();
$this->followRedirects($response)->assertSee('alert-success');
}
public function testCannotUpdateAdminCcAwaysWithoutAdminCcEmail()
{
$this->markTestIncomplete();
}
public function test_can_update_admin_cc_always_to_true()
{
$this->markTestIncomplete();
}
public function test_can_update_admin_cc_always_to_false()
{
$this->markTestIncomplete();
}
}