mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-26 22:19:41 -08:00
185bc966e6
Signed-off-by: snipe <snipe@snipe.net>
30 lines
827 B
PHP
30 lines
827 B
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');
|
|
}
|
|
|
|
}
|