diff options
Diffstat (limited to 'integrations')
-rw-r--r-- | integrations/api_issue_tracked_time_test.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/integrations/api_issue_tracked_time_test.go b/integrations/api_issue_tracked_time_test.go index ed6c036db6..97d401ff9d 100644 --- a/integrations/api_issue_tracked_time_test.go +++ b/integrations/api_issue_tracked_time_test.go @@ -44,6 +44,18 @@ func TestAPIGetTrackedTimes(t *testing.T) { assert.NoError(t, err) assert.Equal(t, user.Name, apiTimes[i].UserName) } + + // test filter + since := "2000-01-01T00%3A00%3A02%2B00%3A00" //946684802 + before := "2000-01-01T00%3A00%3A12%2B00%3A00" //946684812 + + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/issues/%d/times?since=%s&before=%s&token=%s", user2.Name, issue2.Repo.Name, issue2.Index, since, before, token) + resp = session.MakeRequest(t, req, http.StatusOK) + var filterAPITimes api.TrackedTimeList + DecodeJSON(t, resp, &filterAPITimes) + assert.Len(t, filterAPITimes, 2) + assert.Equal(t, int64(3), filterAPITimes[0].ID) + assert.Equal(t, int64(6), filterAPITimes[1].ID) } func TestAPIDeleteTrackedTime(t *testing.T) { |