3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-08-18 11:15:42 +00:00

Updated risky test

This commit is contained in:
snipe
2026-07-31 16:05:56 +01:00
parent c66651d529
commit 225fa61a24

View File

@ -21,8 +21,20 @@ class SlackSettingsFormAuthorizationTest extends TestCase
{
$this->actingAs(User::factory()->superuser()->create());
$initialObLevel = ob_get_level();
Livewire::test(SlackSettingsForm::class)
->assertStatus(200);
// The slack-settings-form view opens @section('content') at line 13
// but never closes it in-file. In production, the parent
// settings/slack.blade.php's trailing @stop closes the section.
// Livewire::test() renders the component in isolation, so the
// section's output buffer stays open and PHPUnit flags the test
// as risky. Drain any buffers opened during render.
while (ob_get_level() > $initialObLevel) {
ob_end_clean();
}
}
public function test_non_superuser_cannot_mount_or_replay()