Skip to content
Permalink
Browse files

Hide unauthorised shows from the Shows page + a test

  • Loading branch information...
GKFX committed Mar 14, 2019
1 parent a9e76c4 commit ad72f5caec8d930b5a969ddda4649765deb5042d
@@ -58,6 +58,7 @@ public function cgetAction(Request $request)
return $this->view($shows);
} else {
$shows = $this->getRepository()->createQueryBuilder('s')
->where('s.authorised = TRUE')
->orderBy('s.id', 'DESC')->setMaxResults(10)
->getQuery()->getResult();
return $this->view(['shows' => $shows])
@@ -109,6 +109,10 @@ public function testSimpleShow()
$data = $this->doJsonRequest('/shows/by-id/' . $show->getId() . '.json');
$this->assertEquals("Test Show", $data['name']);
// Check that by-id can generate 404s
$crawler = $this->client->request('GET', '/shows/by-id/28934');
$this->assertEquals(404, $this->client->getResponse()->getStatusCode());
}
public function testShowWithSociety()

0 comments on commit ad72f5c

Please sign in to comment.
You can’t perform that action at this time.