mirror of
https://github.com/go-gitea/gitea
synced 2025-07-18 00:08:35 +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:
@@ -40,6 +40,6 @@ func TestRenameBranch(t *testing.T) {
|
||||
assert.Equal(t, "/user2/repo1/src/branch/main/README.md", location)
|
||||
|
||||
// check db
|
||||
repo1 := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}).(*repo_model.Repository)
|
||||
repo1 := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1})
|
||||
assert.Equal(t, "main", repo1.DefaultBranch)
|
||||
}
|
||||
|
Reference in New Issue
Block a user