mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-06-24 20:00:02 +02:00
enable linter testifylint on v8 (#4573)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4573 Co-authored-by: TheFox0x7 <thefox0x7@gmail.com> Co-committed-by: TheFox0x7 <thefox0x7@gmail.com>
This commit is contained in:
parent
4d2263e82e
commit
ce563ade3d
503 changed files with 5014 additions and 4665 deletions
|
@ -58,7 +58,7 @@ func TestGiteaPayload(t *testing.T) {
|
|||
Ref string `json:"ref"`
|
||||
}
|
||||
err = json.NewDecoder(req.Body).Decode(&body)
|
||||
assert.NoError(t, err)
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, "test", body.Ref) // short ref
|
||||
})
|
||||
|
||||
|
@ -87,7 +87,7 @@ func TestGiteaPayload(t *testing.T) {
|
|||
Ref string `json:"ref"`
|
||||
}
|
||||
err = json.NewDecoder(req.Body).Decode(&body)
|
||||
assert.NoError(t, err)
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, "refs/heads/test", body.Ref) // full ref
|
||||
})
|
||||
|
||||
|
@ -116,7 +116,7 @@ func TestGiteaPayload(t *testing.T) {
|
|||
Ref string `json:"ref"`
|
||||
}
|
||||
err = json.NewDecoder(req.Body).Decode(&body)
|
||||
assert.NoError(t, err)
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, "test", body.Ref) // short ref
|
||||
})
|
||||
}
|
||||
|
@ -161,7 +161,7 @@ func TestForgejoPayload(t *testing.T) {
|
|||
Ref string `json:"ref"`
|
||||
}
|
||||
err = json.NewDecoder(req.Body).Decode(&body)
|
||||
assert.NoError(t, err)
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, "refs/heads/test", body.Ref) // full ref
|
||||
})
|
||||
|
||||
|
@ -190,7 +190,7 @@ func TestForgejoPayload(t *testing.T) {
|
|||
Ref string `json:"ref"`
|
||||
}
|
||||
err = json.NewDecoder(req.Body).Decode(&body)
|
||||
assert.NoError(t, err)
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, "refs/heads/test", body.Ref) // full ref
|
||||
})
|
||||
|
||||
|
@ -219,7 +219,7 @@ func TestForgejoPayload(t *testing.T) {
|
|||
Ref string `json:"ref"`
|
||||
}
|
||||
err = json.NewDecoder(req.Body).Decode(&body)
|
||||
assert.NoError(t, err)
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, "refs/heads/test", body.Ref) // full ref
|
||||
})
|
||||
}
|
||||
|
@ -245,9 +245,9 @@ func TestOpenProjectPayload(t *testing.T) {
|
|||
assert.Equal(t, "test/repo", j.Get("base", "repo", "full_name").MustBeValid().ToString())
|
||||
assert.Equal(t, "http://localhost:3000/test/repo", j.Get("base", "repo", "html_url").MustBeValid().ToString())
|
||||
|
||||
assert.Equal(t, false, j.Get("draft").MustBeValid().ToBool())
|
||||
assert.False(t, j.Get("draft").MustBeValid().ToBool())
|
||||
assert.Equal(t, jsoniter.NilValue, j.Get("merge_commit_sha").ValueType())
|
||||
assert.Equal(t, false, j.Get("merged").MustBeValid().ToBool())
|
||||
assert.False(t, j.Get("merged").MustBeValid().ToBool())
|
||||
assert.Equal(t, jsoniter.NilValue, j.Get("merged_by").ValueType())
|
||||
assert.Equal(t, jsoniter.NilValue, j.Get("merged_at").ValueType())
|
||||
assert.Equal(t, 0, j.Get("comments").MustBeValid().ToInt())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue