Fix TestNewPagination

Add min_id error pattern.
pull/91/head
178inaba 2019-02-14 23:36:14 +09:00 committed by mattn
parent 460b971f54
commit efa05aa949
1 changed files with 5 additions and 0 deletions

View File

@ -293,6 +293,11 @@ func TestNewPagination(t *testing.T) {
t.Fatalf("should be fail: %v", err)
}
_, err = newPagination(`<http://example.com?min_id=abc>; rel="prev"`)
if err == nil {
t.Fatalf("should be fail: %v", err)
}
pg, err := newPagination(`<http://example.com?max_id=123>; rel="next", <http://example.com?since_id=789>; rel="prev"`)
if err != nil {
t.Fatalf("should not be fail: %v", err)