summaryrefslogtreecommitdiffstats
path: root/tests/integration/api_repo_git_commits_test.go
diff options
context:
space:
mode:
authorTheFox0x7 <thefox0x7@gmail.com>2024-07-30 21:41:10 +0200
committerEarl Warren <earl-warren@noreply.codeberg.org>2024-07-30 21:41:10 +0200
commit4de909747bdf322bbb37d500b9705d7a3a050b78 (patch)
tree62dad5d457c227628877d235f0105db9ae4bc200 /tests/integration/api_repo_git_commits_test.go
parentMerge pull request 'Implement external release assets' (#1445) from maltejur/... (diff)
downloadforgejo-4de909747bdf322bbb37d500b9705d7a3a050b78.tar.xz
forgejo-4de909747bdf322bbb37d500b9705d7a3a050b78.zip
Add testifylint to lint checks (#4535)
go-require lint is ignored for now Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4535 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: TheFox0x7 <thefox0x7@gmail.com> Co-committed-by: TheFox0x7 <thefox0x7@gmail.com>
Diffstat (limited to 'tests/integration/api_repo_git_commits_test.go')
-rw-r--r--tests/integration/api_repo_git_commits_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/integration/api_repo_git_commits_test.go b/tests/integration/api_repo_git_commits_test.go
index 3655206207..c4c626eb49 100644
--- a/tests/integration/api_repo_git_commits_test.go
+++ b/tests/integration/api_repo_git_commits_test.go
@@ -77,7 +77,7 @@ func TestAPIReposGitCommitList(t *testing.T) {
assert.EqualValues(t, "c8e31bc7688741a5287fcde4fbb8fc129ca07027", apiData[1].CommitMeta.SHA)
compareCommitFiles(t, []string{"test.csv"}, apiData[1].Files)
- assert.EqualValues(t, resp.Header().Get("X-Total"), "2")
+ assert.EqualValues(t, "2", resp.Header().Get("X-Total"))
}
func TestAPIReposGitCommitListNotMaster(t *testing.T) {
@@ -103,7 +103,7 @@ func TestAPIReposGitCommitListNotMaster(t *testing.T) {
assert.EqualValues(t, "5099b81332712fe655e34e8dd63574f503f61811", apiData[2].CommitMeta.SHA)
compareCommitFiles(t, []string{"readme.md"}, apiData[2].Files)
- assert.EqualValues(t, resp.Header().Get("X-Total"), "3")
+ assert.EqualValues(t, "3", resp.Header().Get("X-Total"))
}
func TestAPIReposGitCommitListPage2Empty(t *testing.T) {
@@ -121,7 +121,7 @@ func TestAPIReposGitCommitListPage2Empty(t *testing.T) {
var apiData []api.Commit
DecodeJSON(t, resp, &apiData)
- assert.Len(t, apiData, 0)
+ assert.Empty(t, apiData)
}
func TestAPIReposGitCommitListDifferentBranch(t *testing.T) {
@@ -208,7 +208,7 @@ func TestGetFileHistory(t *testing.T) {
assert.Equal(t, "f27c2b2b03dcab38beaf89b0ab4ff61f6de63441", apiData[0].CommitMeta.SHA)
compareCommitFiles(t, []string{"readme.md"}, apiData[0].Files)
- assert.EqualValues(t, resp.Header().Get("X-Total"), "1")
+ assert.EqualValues(t, "1", resp.Header().Get("X-Total"))
}
func TestGetFileHistoryNotOnMaster(t *testing.T) {
@@ -229,5 +229,5 @@ func TestGetFileHistoryNotOnMaster(t *testing.T) {
assert.Equal(t, "c8e31bc7688741a5287fcde4fbb8fc129ca07027", apiData[0].CommitMeta.SHA)
compareCommitFiles(t, []string{"test.csv"}, apiData[0].Files)
- assert.EqualValues(t, resp.Header().Get("X-Total"), "1")
+ assert.EqualValues(t, "1", resp.Header().Get("X-Total"))
}