summaryrefslogtreecommitdiffstats
path: root/integrations/api_issue_tracked_time_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'integrations/api_issue_tracked_time_test.go')
-rw-r--r--integrations/api_issue_tracked_time_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/integrations/api_issue_tracked_time_test.go b/integrations/api_issue_tracked_time_test.go
index 94e569113c..335fd2929a 100644
--- a/integrations/api_issue_tracked_time_test.go
+++ b/integrations/api_issue_tracked_time_test.go
@@ -48,8 +48,8 @@ func TestAPIGetTrackedTimes(t *testing.T) {
}
// test filter
- since := "2000-01-01T00%3A00%3A02%2B00%3A00" //946684802
- before := "2000-01-01T00%3A00%3A12%2B00%3A00" //946684812
+ 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)
@@ -71,17 +71,17 @@ func TestAPIDeleteTrackedTime(t *testing.T) {
session := loginUser(t, user2.Name)
token := getTokenForLoggedInUser(t, session)
- //Deletion not allowed
+ // Deletion not allowed
req := NewRequestf(t, "DELETE", "/api/v1/repos/%s/%s/issues/%d/times/%d?token=%s", user2.Name, issue2.Repo.Name, issue2.Index, time6.ID, token)
session.MakeRequest(t, req, http.StatusForbidden)
time3 := unittest.AssertExistsAndLoadBean(t, &models.TrackedTime{ID: 3}).(*models.TrackedTime)
req = NewRequestf(t, "DELETE", "/api/v1/repos/%s/%s/issues/%d/times/%d?token=%s", user2.Name, issue2.Repo.Name, issue2.Index, time3.ID, token)
session.MakeRequest(t, req, http.StatusNoContent)
- //Delete non existing time
+ // Delete non existing time
session.MakeRequest(t, req, http.StatusNotFound)
- //Reset time of user 2 on issue 2
+ // Reset time of user 2 on issue 2
trackedSeconds, err := models.GetTrackedSeconds(models.FindTrackedTimesOptions{IssueID: 2, UserID: 2})
assert.NoError(t, err)
assert.Equal(t, int64(3661), trackedSeconds)