aboutsummaryrefslogtreecommitdiffstats
path: root/integrations
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-05-09 16:18:44 +0200
committerGitHub <noreply@github.com>2020-05-09 11:18:44 -0300
commitcd4f7ba5bf7191c2ca91438d8903ee9f28f406b9 (patch)
tree5a92b4ff7bc8b719d325bea67da8d0a351794b4a /integrations
parentb9df5da1f4862d3ed58d528258ea56671791d60d (diff)
downloadgitea-cd4f7ba5bf7191c2ca91438d8903ee9f28f406b9.tar.gz
gitea-cd4f7ba5bf7191c2ca91438d8903ee9f28f406b9.zip
Fix tracked time issues (#11349)
* Fix nil exeption: #11313 * fix 500 * activate test 😆 * move logic
Diffstat (limited to 'integrations')
-rw-r--r--integrations/api_issue_tracked_time_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/integrations/api_issue_tracked_time_test.go b/integrations/api_issue_tracked_time_test.go
index 97d401ff9d..1a0ee99a43 100644
--- a/integrations/api_issue_tracked_time_test.go
+++ b/integrations/api_issue_tracked_time_test.go
@@ -72,17 +72,17 @@ func TestAPIDeleteTrackedTime(t *testing.T) {
//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)
- /* Delete own time <-- ToDo: timout without reason
+
time3 := models.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
- session.MakeRequest(t, req, http.StatusInternalServerError) */
+ session.MakeRequest(t, req, http.StatusNotFound)
//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(3662), trackedSeconds)
+ assert.Equal(t, int64(3661), trackedSeconds)
req = NewRequestf(t, "DELETE", "/api/v1/repos/%s/%s/issues/%d/times?token=%s", user2.Name, issue2.Repo.Name, issue2.Index, token)
session.MakeRequest(t, req, http.StatusNoContent)