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:
@ -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()
|
||||
|
||||
Reference in New Issue
Block a user