aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorKevin Decherf <kevin@kdecherf.com>2019-01-22 18:30:02 +0100
committerGitHub <noreply@github.com>2019-01-22 18:30:02 +0100
commit3527c300215e6e6010efb8bb840b8b6f5c63a1cc (patch)
treed3c23a18c966831ecd5f956d6365a2c7126c98c8 /tests
parentc73025ad8b684de1ac21ba7583f1af6f1d185159 (diff)
parentfe5850d6e27f8cf20e7efc5c56672974b4779d9f (diff)
downloadwallabag-3527c300215e6e6010efb8bb840b8b6f5c63a1cc.tar.gz
wallabag-3527c300215e6e6010efb8bb840b8b6f5c63a1cc.tar.zst
wallabag-3527c300215e6e6010efb8bb840b8b6f5c63a1cc.zip
Merge pull request #3526 from wallabag/add-random-article
Add random feature
Diffstat (limited to 'tests')
-rw-r--r--tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php26
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}