diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2017-08-03 12:46:20 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2017-09-06 22:49:15 +0200 |
commit | 7c04b7396a296e31bb11beadc19550396ee728a8 (patch) | |
tree | 907da35635e18957fc981cb6d53b98dd6040290c /tests/Wallabag/ApiBundle/Controller | |
parent | 78b36d4dbeedd60c5aa25dbd30a2a2d41a658f94 (diff) | |
download | wallabag-7c04b7396a296e31bb11beadc19550396ee728a8.tar.gz wallabag-7c04b7396a296e31bb11beadc19550396ee728a8.tar.zst wallabag-7c04b7396a296e31bb11beadc19550396ee728a8.zip |
Multiple tag search was broken from API
First, the setParameter() were done on the same parameter which in fact
just duplicated the condition in the SQL query (like `where t.label =
'test' and t.label = 'test'`.
Changed the parameter doesn't help because the query was then wrong.
Changing the way to match associated tags for an entry and it worked.
Diffstat (limited to 'tests/Wallabag/ApiBundle/Controller')
-rw-r--r-- | tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php b/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php index f4c8a630..fcec3f3b 100644 --- a/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php +++ b/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php | |||
@@ -292,6 +292,9 @@ class EntryRestControllerTest extends WallabagApiTestCase | |||
292 | $this->assertSame(1, $content['page']); | 292 | $this->assertSame(1, $content['page']); |
293 | $this->assertGreaterThanOrEqual(1, $content['pages']); | 293 | $this->assertGreaterThanOrEqual(1, $content['pages']); |
294 | 294 | ||
295 | $this->assertContains('foo', array_column($content['_embedded']['items'][0]['tags'], 'label'), 'Entries tags should have "foo" tag'); | ||
296 | $this->assertContains('bar', array_column($content['_embedded']['items'][0]['tags'], 'label'), 'Entries tags should have "bar" tag'); | ||
297 | |||
295 | $this->assertArrayHasKey('_links', $content); | 298 | $this->assertArrayHasKey('_links', $content); |
296 | $this->assertArrayHasKey('self', $content['_links']); | 299 | $this->assertArrayHasKey('self', $content['_links']); |
297 | $this->assertArrayHasKey('first', $content['_links']); | 300 | $this->assertArrayHasKey('first', $content['_links']); |