From e36bb5224541733df3b17ed8ec636adca4d7c028 Mon Sep 17 00:00:00 2001 From: marcoc Date: Thu, 12 Oct 2023 16:38:13 +0200 Subject: [PATCH] add export endpoint test --- tests/PagesTest.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/PagesTest.php b/tests/PagesTest.php index e690593..6911783 100644 --- a/tests/PagesTest.php +++ b/tests/PagesTest.php @@ -44,4 +44,15 @@ class PagesTest extends TestCase __('File exporter'), $this->response->getContent() ); } + + public function test_export_endpoint_is_not_reachable_for_guests_and_redirect_to_login() + { + $home = $this->get('/'); + $res = $this->get('/export'); + + $res->assertResponseStatus(302); + $res->assertEquals( + $home->response->getContent(), $this->response->getContent() + ); + } }