diff options
author | Michael Santos <michael.santos@gmail.com> | 2023-10-09 07:22:12 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-09 11:22:12 +0000 |
commit | 5283ce9650b1ada6b4bd38212ca44ba77297a31b (patch) | |
tree | da0de2365da103e978a83f9dd703bbc9250cf250 /tests/integration | |
parent | 65eea1d53696badfb1ef376e5268dbae942089b6 (diff) | |
download | gitea-5283ce9650b1ada6b4bd38212ca44ba77297a31b.tar.gz gitea-5283ce9650b1ada6b4bd38212ca44ba77297a31b.zip |
api: GetPullRequestCommits: return file list (#27483)
Fixes https://github.com/go-gitea/gitea/issues/27481
----
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'tests/integration')
-rw-r--r-- | tests/integration/api_pull_commits_test.go | 5 | ||||
-rw-r--r-- | tests/integration/api_repo_git_notes_test.go | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/integration/api_pull_commits_test.go b/tests/integration/api_pull_commits_test.go index 0bcfb90684..ad0cb0329c 100644 --- a/tests/integration/api_pull_commits_test.go +++ b/tests/integration/api_pull_commits_test.go @@ -35,6 +35,11 @@ func TestAPIPullCommits(t *testing.T) { assert.Equal(t, "5f22f7d0d95d614d25a5b68592adb345a4b5c7fd", commits[0].SHA) assert.Equal(t, "4a357436d925b5c974181ff12a994538ddc5a269", commits[1].SHA) + + assert.NotEmpty(t, commits[0].Files) + assert.NotEmpty(t, commits[1].Files) + assert.NotNil(t, commits[0].RepoCommit.Verification) + assert.NotNil(t, commits[1].RepoCommit.Verification) } // TODO add tests for already merged PR and closed PR diff --git a/tests/integration/api_repo_git_notes_test.go b/tests/integration/api_repo_git_notes_test.go index 30846f235f..a7327d9327 100644 --- a/tests/integration/api_repo_git_notes_test.go +++ b/tests/integration/api_repo_git_notes_test.go @@ -37,5 +37,7 @@ func TestAPIReposGitNotes(t *testing.T) { var apiData api.Note DecodeJSON(t, resp, &apiData) assert.Equal(t, "This is a test note\n", apiData.Message) + assert.NotEmpty(t, apiData.Commit.Files) + assert.NotNil(t, apiData.Commit.RepoCommit.Verification) }) } |