Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: appleboy <appleboy.tw@gmail.com>
  • Loading branch information
appleboy committed Apr 13, 2024
1 parent 850732b commit ecf11ed
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/integration/api_repo_compare_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
package integration

import (
"log"
"net/http"
"testing"

auth_model "code.gitea.io/gitea/models/auth"
"code.gitea.io/gitea/models/unittest"
user_model "code.gitea.io/gitea/models/user"
"code.gitea.io/gitea/modules/setting"
api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/tests"

Expand All @@ -34,8 +34,7 @@ func TestAPICompareTag(t *testing.T) {
var apiResp *api.Compare
DecodeJSON(t, resp, &apiResp)

log.Printf("Total commits: %v", apiResp.TotalCommits)
log.Printf("Commits: %v", apiResp.Commits)
assert.Len(t, apiResp.TotalCommits, 1)
assert.Equal(t, "Initial commit", apiResp.Commits[0].RepoCommit.Message)
assert.Equal(t, "65f1bf27bc3bf70f64657658635e66094edbcb4d", apiResp.Commits[0].SHA)
assert.Equal(t, setting.AppURL+"api/v1/repos/user2/repo1/git/commits/65f1bf27bc3bf70f64657658635e66094edbcb4d", apiResp.Commits[0].URL)
}

0 comments on commit ecf11ed

Please sign in to comment.