mirror of
https://github.com/go-gitea/gitea
synced 2025-07-16 07:18:37 +00:00
Refactor AssertExistsAndLoadBean to use generics (#20797)
* Refactor AssertExistsAndLoadBean to use generics * Fix tests Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
@@ -49,7 +49,7 @@ func TestPushCommits_ToAPIPayloadCommits(t *testing.T) {
|
||||
}
|
||||
pushCommits.HeadCommit = &PushCommit{Sha1: "69554a6"}
|
||||
|
||||
repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 16}).(*repo_model.Repository)
|
||||
repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 16})
|
||||
payloadCommits, headCommit, err := pushCommits.ToAPIPayloadCommits(git.DefaultContext, repo.RepoPath(), "/user2/repo16")
|
||||
assert.NoError(t, err)
|
||||
assert.Len(t, payloadCommits, 3)
|
||||
|
Reference in New Issue
Block a user