aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2017-07-10 21:32:25 +0200
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2017-12-18 14:50:04 +0100
commitc1c0f09949c85218b720280d84eca70dad51b65a (patch)
tree892de551fe0ec2e866cecef82c6602c4fd4bc99a /tests
parentef5c8a7d01d7b3f0041455503499ab67e2206e0d (diff)
downloadwallabag-c1c0f09949c85218b720280d84eca70dad51b65a.tar.gz
wallabag-c1c0f09949c85218b720280d84eca70dad51b65a.tar.zst
wallabag-c1c0f09949c85218b720280d84eca70dad51b65a.zip
Added given_url in entry table
Diffstat (limited to 'tests')
-rw-r--r--tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
index 0e7e1576..cd63c1ba 100644
--- a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
+++ b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
@@ -265,6 +265,41 @@ class EntryControllerTest extends WallabagCoreTestCase
265 $this->assertContains('/view/', $client->getResponse()->getTargetUrl()); 265 $this->assertContains('/view/', $client->getResponse()->getTargetUrl());
266 } 266 }
267 267
268 public function testPostNewOkUrlExistWithRedirection()
269 {
270 $this->logInAs('admin');
271 $client = $this->getClient();
272
273 $url = 'https://fashionunited.com/news/business/jigsaw-posts-8-percent-increase-in-annual-sales/2017070316404';
274
275 $crawler = $client->request('GET', '/new');
276
277 $this->assertSame(200, $client->getResponse()->getStatusCode());
278
279 $form = $crawler->filter('form[name=entry]')->form();
280
281 $data = [
282 'entry[url]' => $url,
283 ];
284
285 $client->submit($form, $data);
286
287 $crawler = $client->request('GET', '/new');
288
289 $this->assertSame(200, $client->getResponse()->getStatusCode());
290
291 $form = $crawler->filter('form[name=entry]')->form();
292
293 $data = [
294 'entry[url]' => $url,
295 ];
296
297 $client->submit($form, $data);
298
299 $this->assertSame(302, $client->getResponse()->getStatusCode());
300 $this->assertContains('/view/', $client->getResponse()->getTargetUrl());
301 }
302
268 /** 303 /**
269 * This test will require an internet connection. 304 * This test will require an internet connection.
270 */ 305 */