Skip to content

Commit

Permalink
v3 - Missing Tests - Pagination Related Tests (#1363)
Browse files Browse the repository at this point in the history
* Add missing pagination helper tests


---------

Co-authored-by: lrljoe <[email protected]>
  • Loading branch information
lrljoe and lrljoe authored Sep 21, 2023
1 parent e609f13 commit d6e6512
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

All notable changes to `laravel-livewire-tables` will be documented in this file

## [Unreleased] - 3.x - Missing pagination tests
- Add missing pagination tests

## [Unreleased] - 3.x - Beta Fixes (beta-1)
- Removal of setSearchLazy
- Fix for setSearchDebounce
Expand Down
14 changes: 14 additions & 0 deletions tests/Traits/Helpers/PaginationHelpersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,18 @@ public function can_check_and_set_pagination_method(): void

$this->assertTrue($this->basicTable->isPaginationMethod('standard'));
}

/** @test */
public function can_check_per_page_displayed_item_count(): void
{
$this->assertSame(5, $this->basicTable->getPerPageDisplayedItemCount());

}

/** @test */
public function can_check_per_page_displayed_items(): void
{
$this->assertSame([1, 2, 3, 4, 5], $this->basicTable->getPerPageDisplayedItemIds());

}
}

0 comments on commit d6e6512

Please sign in to comment.