validate per_page before page

plus an additional check just in case
Closes #1688
This commit is contained in:
Anton Kaliaev
2018-06-05 16:20:48 +04:00
parent 3445f1206e
commit 2ce8179c8b
3 changed files with 7 additions and 1 deletions

View File

@ -15,6 +15,8 @@ func TestPaginationPage(t *testing.T) {
page int
newPage int
}{
{0, 0, 1, 1},
{0, 10, 0, 1},
{0, 10, 1, 1},
{0, 10, 2, 1},