From d6401bc3c54c9d12ccb798e1d964420d31741667 Mon Sep 17 00:00:00 2001 From: XaviQV Date: Sun, 10 Feb 2019 12:21:14 +0100 Subject: [PATCH] Comment assert that may not work --- tests/PanicHDTestCase.php | 8 ++++++-- tests/TicketsTest.php | 6 ++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/PanicHDTestCase.php b/tests/PanicHDTestCase.php index 4a418f0f..96191501 100644 --- a/tests/PanicHDTestCase.php +++ b/tests/PanicHDTestCase.php @@ -69,21 +69,25 @@ public function load_vars() } if (is_null($this->member)){ + // TODO: Generate fake user if (Member::users()->count() > 0){ $this->member = Member::whereHas('tickets', function($query){ $query->notHidden(); })->inRandomOrder()->users()->first(); if (!is_null($this->member)){ - $this->member_tickets_builder = $this->member->tickets()->inRandomOrder(); + // TODO: Generate fake tickets + $this->member_tickets_builder = $this->member->tickets()->inRandomOrder(); } } } if (is_null($this->agent)){ - if (Member::agents()->count() > 0){ + // TODO: Generate fake agent + if (Member::agents()->count() > 0){ $this->agent = Member::whereHas('agentTickets')->inRandomOrder()->agents()->first(); } } if (is_null($this->admin)){ + // TODO: Generate fake admin if (Member::admins()->count() > 0){ $this->admin = Member::inRandomOrder()->admins()->first(); } diff --git a/tests/TicketsTest.php b/tests/TicketsTest.php index 26381020..4764cd11 100644 --- a/tests/TicketsTest.php +++ b/tests/TicketsTest.php @@ -94,8 +94,10 @@ public function testTicketShowEdit() $ticket = $ticket->notHidden()->first(); $response = $this->actingAs($this->member)->get(route($this->main_route . '.show', ['id' => $ticket->id])); $this->versionAssertStatus($response, 200); - $response = $this->actingAs($this->member)->get(route($this->main_route . '.edit', ['id' => $ticket->id])); - $this->versionAssertStatus($response, 302); + /* + // TODO: Ensure to generate a fake user that doesn't have edit permissions on the aimed ticket + $response = $this->actingAs($this->member)->get(route($this->main_route . '.edit', ['id' => $ticket->id])); + $this->versionAssertStatus($response, 302);*/ // Hidden ticket without $this->member in notifications $ticket = clone $this->member_tickets_builder;