import tags from v1 (#1657)

This commit is contained in:
Thomas Citharel
2016-02-12 14:49:41 +01:00
parent 06c190887f
commit fca2b05200
3 changed files with 44 additions and 3 deletions

View File

@ -39,6 +39,21 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase
$crawler = $client->followRedirect();
$content = $client->getContainer()
->get('doctrine.orm.entity_manager')
->getRepository('WallabagCoreBundle:Entry')
->findByUrlAndUserId(
'http://www.framablog.org/index.php/post/2014/02/05/Framabag-service-libre-gratuit-interview-developpeur',
$this->getLoggedInUserId()
);
$tag = $client->getContainer()
->get('doctrine.orm.entity_manager')
->getRepository('WallabagCoreBundle:Tag')
->findOneByLabel('Framabag');
$this->assertTrue($content->getTags()->contains($tag));
$this->assertGreaterThan(1, $alert = $crawler->filter('div.messages.success')->extract(array('_text')));
$this->assertContains('Import summary', $alert[0]);
}