aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2018-10-12 21:41:05 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2018-10-12 22:13:54 +0200
commitba335762a80e7860a166c9191502e9c35a5d76b4 (patch)
tree001ca9d25acb144dbf73c74de75fcae1a6197269 /tests
parent6c42fbf04372f04821a50402abd91b68d52856e7 (diff)
downloadwallabag-ba335762a80e7860a166c9191502e9c35a5d76b4.tar.gz
wallabag-ba335762a80e7860a166c9191502e9c35a5d76b4.tar.zst
wallabag-ba335762a80e7860a166c9191502e9c35a5d76b4.zip
Use only one method to randomize
Instead of one per type, one for all is ok.
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 6effe43e..4f8ad08f 100644
--- a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
+++ b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
@@ -1497,4 +1497,30 @@ class EntryControllerTest extends WallabagCoreTestCase
1497 1497
1498 $this->assertSame(sprintf('/remove-tag/%s/%s', $entry->getId(), $tag->getId()), $link); 1498 $this->assertSame(sprintf('/remove-tag/%s/%s', $entry->getId(), $tag->getId()), $link);
1499 } 1499 }
1500
1501 public function testRandom()
1502 {
1503 $this->logInAs('admin');
1504 $client = $this->getClient();
1505
1506 $client->request('GET', '/unread/random');
1507 $this->assertSame(302, $client->getResponse()->getStatusCode());
1508 $this->assertContains('/view/', $client->getResponse()->getTargetUrl(), 'Unread random');
1509
1510 $client->request('GET', '/starred/random');
1511 $this->assertSame(302, $client->getResponse()->getStatusCode());
1512 $this->assertContains('/view/', $client->getResponse()->getTargetUrl(), 'Starred random');
1513
1514 $client->request('GET', '/archive/random');
1515 $this->assertSame(302, $client->getResponse()->getStatusCode());
1516 $this->assertContains('/view/', $client->getResponse()->getTargetUrl(), 'Archive random');
1517
1518 $client->request('GET', '/untagged/random');
1519 $this->assertSame(302, $client->getResponse()->getStatusCode());
1520 $this->assertContains('/view/', $client->getResponse()->getTargetUrl(), 'Untagged random');
1521
1522 $client->request('GET', '/all/random');
1523 $this->assertSame(302, $client->getResponse()->getStatusCode());
1524 $this->assertContains('/view/', $client->getResponse()->getTargetUrl(), 'All random');
1525 }
1500} 1526}