Skip to content

Commit

Permalink
Add updatedPerPageTest (#2047)
Browse files Browse the repository at this point in the history
* Add updatedPerPageTest

* Fix styling

---------

Co-authored-by: lrljoe <[email protected]>
  • Loading branch information
lrljoe and lrljoe authored Nov 10, 2024
1 parent ce3abe8 commit 0769663
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/Unit/Traits/Helpers/PaginationHelpersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,4 +202,17 @@ public function test_can_get_pagination_wrapper_attributes_bag(): void
$this->assertSame((new \Illuminate\View\ComponentAttributeBag(['class' => 'text-lg', 'testval' => '123']))->getAttributes(), $this->basicTable->getPaginationWrapperAttributesBag()->getAttributes());

}

public function test_check_updated_per_page_returns_correctly(): void
{
$rows = $this->basicTable->getRows();
$this->basicTable->setPerPageAccepted([5, 10, 15, 25, 50]);

$this->basicTable->setPerPage(5);
$this->assertSame(5, $this->basicTable->getPerPage());

$this->basicTable->updatedPerPage(15);
$this->assertSame(15, $this->basicTable->getPerPage());

}
}

0 comments on commit 0769663

Please sign in to comment.