Fixed news test
This commit is contained in:
parent
09e6e9d239
commit
6b15e6b86e
|
@ -136,6 +136,7 @@ class NewsController extends BaseController
|
||||||
->orderByDesc('is_pinned')
|
->orderByDesc('is_pinned')
|
||||||
->orderByDesc('is_important')
|
->orderByDesc('is_important')
|
||||||
->orderByDesc('updated_at')
|
->orderByDesc('updated_at')
|
||||||
|
->orderByDesc('id')
|
||||||
->limit($perPage)
|
->limit($perPage)
|
||||||
->offset(($page - 1) * $perPage)
|
->offset(($page - 1) * $perPage)
|
||||||
->get();
|
->get();
|
||||||
|
|
|
@ -98,7 +98,7 @@ class NewsControllerTest extends ControllerTest
|
||||||
$this->assertEquals(3, $data['pages']);
|
$this->assertEquals(3, $data['pages']);
|
||||||
$this->assertEquals(2, $data['page']);
|
$this->assertEquals(2, $data['page']);
|
||||||
$this->assertTrue($news[0]->is_pinned);
|
$this->assertTrue($news[0]->is_pinned);
|
||||||
$this->assertEquals('Ipsum', $news[0]->title);
|
$this->assertEquals('Bar', $news[0]->title);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
// Show meetings
|
// Show meetings
|
||||||
|
|
Loading…
Reference in New Issue