mirror of
https://github.com/wallabag/wallabag.git
synced 2025-09-15 18:57:05 +00:00
Add support of mass action to tag entries
Closes #3118 Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
This commit is contained in:
parent
d510dc6c98
commit
08eb190c95
6 changed files with 88 additions and 2 deletions
|
@ -1698,6 +1698,10 @@ class EntryControllerTest extends WallabagCoreTestCase
|
|||
$entry2->setUrl($this->url);
|
||||
$this->getEntityManager()->persist($entry2);
|
||||
|
||||
$entry3 = new Entry($this->getLoggedInUser());
|
||||
$entry3->setUrl($this->url);
|
||||
$this->getEntityManager()->persist($entry3);
|
||||
|
||||
$this->getEntityManager()->flush();
|
||||
$this->getEntityManager()->clear();
|
||||
|
||||
|
@ -1749,6 +1753,36 @@ class EntryControllerTest extends WallabagCoreTestCase
|
|||
|
||||
$this->assertSame(1, $res->isStarred());
|
||||
|
||||
// Mass actions : tag
|
||||
$client->request('POST', '/mass', [
|
||||
'tag' => '',
|
||||
'tags' => 'foo',
|
||||
'entry-checkbox' => $entries,
|
||||
]);
|
||||
|
||||
$this->assertSame(302, $client->getResponse()->getStatusCode());
|
||||
|
||||
$res = $client->getContainer()
|
||||
->get('doctrine.orm.entity_manager')
|
||||
->getRepository('WallabagCoreBundle:Entry')
|
||||
->find($entry1->getId());
|
||||
|
||||
$this->assertContains('foo', $res->getTagsLabel());
|
||||
|
||||
$res = $client->getContainer()
|
||||
->get('doctrine.orm.entity_manager')
|
||||
->getRepository('WallabagCoreBundle:Entry')
|
||||
->find($entry2->getId());
|
||||
|
||||
$this->assertContains('foo', $res->getTagsLabel());
|
||||
|
||||
$res = $client->getContainer()
|
||||
->get('doctrine.orm.entity_manager')
|
||||
->getRepository('WallabagCoreBundle:Entry')
|
||||
->find($entry3->getId());
|
||||
|
||||
$this->assertNotContains('foo', $res->getTagsLabel());
|
||||
|
||||
// Mass actions : delete
|
||||
$client->request('POST', '/mass', [
|
||||
'delete' => '',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue