X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/88049476fe496de3a3b767a4305d985f78a96db8..refs/pull/806/head:/tests/TestCase.php diff --git a/tests/TestCase.php b/tests/TestCase.php index 67a18777a..e0f160eed 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -1,39 +1,28 @@ -make(Illuminate\Contracts\Console\Kernel::class)->bootstrap(); - - return $app; - } - - public function asAdmin() + protected function assertPermissionError(TestResponse $response) { - if($this->admin === null) { - $this->admin = \BookStack\User::find(1); - } - return $this->actingAs($this->admin); + $response->assertRedirect('/'); + $this->assertTrue(session()->has('error')); + session()->remove('error'); } -} +} \ No newline at end of file