[GITEA] Simplify cron list test (squash)

- 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 55bcaf60ec)
This commit is contained in:
Gusted 2023-08-29 22:00:16 +02:00 committed by Earl Warren
parent cc258d342e
commit 4f03e48106
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -298,11 +298,12 @@ func TestAPICron(t *testing.T) {
req := NewRequest(t, "GET", urlStr) req := NewRequest(t, "GET", urlStr)
resp := MakeRequest(t, req, http.StatusOK) 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 var crons []api.Cron
DecodeJSON(t, resp, &crons) DecodeJSON(t, resp, &crons)
assert.Len(t, crons, 27)
assert.NotEmpty(t, crons)
}) })
t.Run("Execute", func(t *testing.T) { t.Run("Execute", func(t *testing.T) {