Skip to content

Commit

Permalink
[Test] cover mode by tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JanGalek committed Dec 17, 2024
1 parent 978dea8 commit 31c0ed4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/paginator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,15 @@ func TestPaginator_GetPageCount_ItemCountNil(t *testing.T) {
assert.Nil(t, p.GetPageCount(), "PageCount should be nil when itemCount is nil")
}

func TestPaginator_GetFirstPage(t *testing.T) {
p := paginator.NewPaginator()

assert.Equal(t, 1, p.GetFirstPage(), "FirstPage should return the default base value 1")

p.SetBase(5)
assert.Equal(t, 5, p.GetFirstPage(), "FirstPage should return the updated base value")
}

func TestPaginator_GetLastPage(t *testing.T) {
p := paginator.NewPaginator()

Expand Down

0 comments on commit 31c0ed4

Please sign in to comment.