diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php index 005296ff..28291b5a 100644 --- a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php | |||
@@ -1495,4 +1495,30 @@ class EntryControllerTest extends WallabagCoreTestCase | |||
1495 | 1495 | ||
1496 | $this->assertSame(sprintf('/remove-tag/%s/%s', $entry->getId(), $tag->getId()), $link); | 1496 | $this->assertSame(sprintf('/remove-tag/%s/%s', $entry->getId(), $tag->getId()), $link); |
1497 | } | 1497 | } |
1498 | |||
1499 | public function testRandom() | ||
1500 | { | ||
1501 | $this->logInAs('admin'); | ||
1502 | $client = $this->getClient(); | ||
1503 | |||
1504 | $client->request('GET', '/unread/random'); | ||
1505 | $this->assertSame(302, $client->getResponse()->getStatusCode()); | ||
1506 | $this->assertContains('/view/', $client->getResponse()->getTargetUrl(), 'Unread random'); | ||
1507 | |||
1508 | $client->request('GET', '/starred/random'); | ||
1509 | $this->assertSame(302, $client->getResponse()->getStatusCode()); | ||
1510 | $this->assertContains('/view/', $client->getResponse()->getTargetUrl(), 'Starred random'); | ||
1511 | |||
1512 | $client->request('GET', '/archive/random'); | ||
1513 | $this->assertSame(302, $client->getResponse()->getStatusCode()); | ||
1514 | $this->assertContains('/view/', $client->getResponse()->getTargetUrl(), 'Archive random'); | ||
1515 | |||
1516 | $client->request('GET', '/untagged/random'); | ||
1517 | $this->assertSame(302, $client->getResponse()->getStatusCode()); | ||
1518 | $this->assertContains('/view/', $client->getResponse()->getTargetUrl(), 'Untagged random'); | ||
1519 | |||
1520 | $client->request('GET', '/all/random'); | ||
1521 | $this->assertSame(302, $client->getResponse()->getStatusCode()); | ||
1522 | $this->assertContains('/view/', $client->getResponse()->getTargetUrl(), 'All random'); | ||
1523 | } | ||
1498 | } | 1524 | } |