Fixed news test

This commit is contained in:
Igor Scheller 2023-02-09 14:26:48 +01:00 committed by Michael Weimann
parent 09e6e9d239
commit 6b15e6b86e
2 changed files with 2 additions and 1 deletions

View File

@ -136,6 +136,7 @@ class NewsController extends BaseController
->orderByDesc('is_pinned')
->orderByDesc('is_important')
->orderByDesc('updated_at')
->orderByDesc('id')
->limit($perPage)
->offset(($page - 1) * $perPage)
->get();

View File

@ -98,7 +98,7 @@ class NewsControllerTest extends ControllerTest
$this->assertEquals(3, $data['pages']);
$this->assertEquals(2, $data['page']);
$this->assertTrue($news[0]->is_pinned);
$this->assertEquals('Ipsum', $news[0]->title);
$this->assertEquals('Bar', $news[0]->title);
break;
case 2:
// Show meetings