(t *testing.T)
| 139 | } |
| 140 | |
| 141 | func Test_PageInfoSortBy(t *testing.T) { |
| 142 | t.Parallel() |
| 143 | |
| 144 | p := NewPageInfo(1, 10, 0, nil) |
| 145 | p.SortBy("name", ASC).SortBy("date", DESC) |
| 146 | |
| 147 | require.Len(t, p.Sort, 2) |
| 148 | require.Equal(t, "name", p.Sort[0].Field) |
| 149 | require.Equal(t, ASC, p.Sort[0].Order) |
| 150 | require.Equal(t, "date", p.Sort[1].Field) |
| 151 | require.Equal(t, DESC, p.Sort[1].Order) |
| 152 | } |
| 153 | |
| 154 | func Test_PageInfoNextPageURL(t *testing.T) { |
| 155 | t.Parallel() |
nothing calls this directly
no test coverage detected