expand test cases

This commit is contained in:
Shish 2016-06-07 01:56:05 +01:00
parent bfa1dc20c0
commit 3d05c2896a

View File

@ -132,7 +132,14 @@ class IndexTest extends ShimmiePHPUnitTestCase {
/* * * * * * * * * * *
* Wildcards *
* * * * * * * * * * */
public function testWildSearch() {
public function testWildSearchNoResults() {
$image_ids = $this->upload();
$this->get_page("post/list/asdfasdf*/1");
$this->assert_response(404);
}
public function testWildSearchOneResult() {
$image_ids = $this->upload();
// Only the first image matches both the wildcard and the tag.
@ -143,6 +150,15 @@ class IndexTest extends ShimmiePHPUnitTestCase {
$this->get_page("post/list/comp* screenshot/1");
$this->assert_response(302);
}
public function testWildSearchManyResults() {
$image_ids = $this->upload();
// two images match comp* - one matches it once,
// one matches it twice
$this->get_page("post/list/comp*/1");
$this->assert_response(200);
}
/* * * * * * * * * * *
* Mixed *