Skip to content

Commit

Permalink
[GITEA] Simplify cron list test (squash)
Browse files Browse the repository at this point in the history
- As per
https://codeberg.org/forgejo/forgejo/pulls/1352#issuecomment-1076074
- Only test if the returned stuff is correct, not necessarily accurate.

(cherry picked from commit 55bcaf60ec21aec000ff79635981a16566c77d43)
(cherry picked from commit 4f03e4810619455e7dca65741cb53a9fd2d98bfe)
(cherry picked from commit f35c31b9beef33e0aafc4e62e5b8fa38b3623494)
  • Loading branch information
Gusted authored and earl-warren committed Sep 18, 2023
1 parent 360ac8e commit d08f486
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/integration/api_admin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,11 +298,12 @@ func TestAPICron(t *testing.T) {
req := NewRequest(t, "GET", urlStr)
resp := MakeRequest(t, req, http.StatusOK)

assert.Equal(t, "27", resp.Header().Get("X-Total-Count"))
assert.NotEmpty(t, resp.Header().Get("X-Total-Count"))

var crons []api.Cron
DecodeJSON(t, resp, &crons)
assert.Len(t, crons, 27)

assert.NotEmpty(t, crons)
})

t.Run("Execute", func(t *testing.T) {
Expand Down

0 comments on commit d08f486

Please sign in to comment.