Skip to content

Commit a50881c

Browse files
committed
Added test for search page
1 parent 9c55c95 commit a50881c

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

tests/TicketsTest.php

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,4 +167,32 @@ public function testTicketShowEdit()
167167
}
168168
}
169169
}
170+
171+
/*
172+
* Ticket Search form
173+
*/
174+
public function testTicketSearch()
175+
{
176+
$this->load_vars();
177+
178+
if ($this->status == "Installed" and !is_null($this->main_route)){
179+
// Member should not be able to access
180+
if(!is_null($this->member)){
181+
$response = $this->actingAs($this->member)->get(route($this->main_route . '.search.form'));
182+
$this->versionAssertStatus($response, 302);
183+
}
184+
185+
// Agent access
186+
if(!is_null($this->agent)){
187+
$response = $this->actingAs($this->agent)->get(route($this->main_route . '.search.form'));
188+
$this->versionAssertStatus($response, 200);
189+
}
190+
191+
// Admin access
192+
if(!is_null($this->admin)){
193+
$response = $this->actingAs($this->admin)->get(route($this->main_route . '.search.form'));
194+
$this->versionAssertStatus($response, 200);
195+
}
196+
}
197+
}
170198
}

0 commit comments

Comments
 (0)