Skip to content

Commit

Permalink
Test for making sure we can limit results
Browse files Browse the repository at this point in the history
  • Loading branch information
micah eschbacher committed Apr 30, 2015
1 parent 4f942d1 commit 86e4803
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/ExampleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,17 @@ public function testSelectAllForWithPluckedColumns()
$this->visitDatatable('columns')->seeJSONContains($a);
}

public function testDatatableRespectsASetLimit()
{
$expected = [TestDummy::create('Model')->toArray()];
TestDummy::times(50)->create('Model');
$a = [
'aaData'=> $expected,
'iTotalRecords'=>51,
'iTotalDisplayRecords'=>1
];
$dt = new Datatable;
$dt->limitedTo(1);
$this->visitDatatable('limit', $dt)->seeJSONContains($a);
}
}

0 comments on commit 86e4803

Please sign in to comment.