aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php
diff options
context:
space:
mode:
authorJérémy Benoist <j0k3r@users.noreply.github.com>2017-05-31 17:26:05 +0200
committerGitHub <noreply@github.com>2017-05-31 17:26:05 +0200
commitec8e7ffad48c9920b4b63b8e278c8bec1fc6f480 (patch)
tree1f4387becf57b376759e72c6a8de28693776de6d /tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php
parent4423b88c5b2c2d530b0a83a822f521a61ca4d4b8 (diff)
parent4368a27152021fd5a5ac09109eb0260d69c54c3c (diff)
downloadwallabag-ec8e7ffad48c9920b4b63b8e278c8bec1fc6f480.tar.gz
wallabag-ec8e7ffad48c9920b4b63b8e278c8bec1fc6f480.tar.zst
wallabag-ec8e7ffad48c9920b4b63b8e278c8bec1fc6f480.zip
Merge pull request #3106 from wallabag/api-content
Allow other fields to be send using API
Diffstat (limited to 'tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php')
-rw-r--r--tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php b/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php
index bf7d373a..e9ba4634 100644
--- a/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php
+++ b/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php
@@ -342,6 +342,10 @@ class EntryRestControllerTest extends WallabagApiTestCase
342 'url' => 'http://www.lemonde.fr/pixels/article/2015/03/28/plongee-dans-l-univers-d-ingress-le-jeu-de-google-aux-frontieres-du-reel_4601155_4408996.html', 342 'url' => 'http://www.lemonde.fr/pixels/article/2015/03/28/plongee-dans-l-univers-d-ingress-le-jeu-de-google-aux-frontieres-du-reel_4601155_4408996.html',
343 'tags' => 'google', 343 'tags' => 'google',
344 'title' => 'New title for my article', 344 'title' => 'New title for my article',
345 'content' => 'my content',
346 'language' => 'de_DE',
347 'published_at' => '2016-09-08T11:55:58+0200',
348 'authors' => 'bob,helen',
345 ]); 349 ]);
346 350
347 $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); 351 $this->assertEquals(200, $this->client->getResponse()->getStatusCode());
@@ -355,6 +359,12 @@ class EntryRestControllerTest extends WallabagApiTestCase
355 $this->assertEquals('New title for my article', $content['title']); 359 $this->assertEquals('New title for my article', $content['title']);
356 $this->assertEquals(1, $content['user_id']); 360 $this->assertEquals(1, $content['user_id']);
357 $this->assertCount(2, $content['tags']); 361 $this->assertCount(2, $content['tags']);
362 $this->assertSame('my content', $content['content']);
363 $this->assertSame('de_DE', $content['language']);
364 $this->assertSame('2016-09-08T11:55:58+0200', $content['published_at']);
365 $this->assertCount(2, $content['published_by']);
366 $this->assertContains('bob', $content['published_by']);
367 $this->assertContains('helen', $content['published_by']);
358 } 368 }
359 369
360 public function testPostSameEntry() 370 public function testPostSameEntry()