more test passing
This commit is contained in:
parent
08b9729c72
commit
338bbcdbcb
2 changed files with 4 additions and 3 deletions
|
@ -357,8 +357,9 @@ class Image
|
|||
');
|
||||
} else {
|
||||
$tags[] = 'id'. $gtlt . $this->id;
|
||||
$tags[] = 'order:id_'. strtolower($dir);
|
||||
$querylet = Image::build_search_querylet($tags);
|
||||
$querylet->append_sql(' ORDER BY images.id '.$dir.' LIMIT 1');
|
||||
$querylet->append_sql(' LIMIT 1');
|
||||
$row = $database->get_row($querylet->sql, $querylet->variables);
|
||||
}
|
||||
|
||||
|
|
|
@ -43,10 +43,10 @@ class ViewImageTest extends ShimmiePHPUnitTestCase
|
|||
|
||||
// When searching, we skip the middle
|
||||
$page = $this->get_page("post/prev/$image_id_1", ["search"=>"test"]);
|
||||
$this->assertEquals("/test/post/view/$image_id_3", $page->redirect);
|
||||
$this->assertEquals("/test/post/view/$image_id_3?#search=test", $page->redirect);
|
||||
|
||||
$page = $this->get_page("post/next/$image_id_3", ["search"=>"test"]);
|
||||
$this->assertEquals("/test/post/view/$image_id_1", $page->redirect);
|
||||
$this->assertEquals("/test/post/view/$image_id_1?#search=test", $page->redirect);
|
||||
|
||||
// Middle image: has next and prev
|
||||
$page = $this->get_page("post/next/$image_id_2");
|
||||
|
|
Reference in a new issue