diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2022-08-16 10:22:25 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-16 10:22:25 +0800 |
commit | 86c85c19b625e6ddd99f220a13ee3b5c4cc398e1 (patch) | |
tree | 2545e0c31d5e240b1b168041601c2c24db63bae4 /integrations/change_default_branch_test.go | |
parent | e3308a092ad00585607089434b2ec5ec4f07c539 (diff) | |
download | gitea-86c85c19b625e6ddd99f220a13ee3b5c4cc398e1.tar.gz gitea-86c85c19b625e6ddd99f220a13ee3b5c4cc398e1.zip |
Refactor AssertExistsAndLoadBean to use generics (#20797)
* Refactor AssertExistsAndLoadBean to use generics
* Fix tests
Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'integrations/change_default_branch_test.go')
-rw-r--r-- | integrations/change_default_branch_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/integrations/change_default_branch_test.go b/integrations/change_default_branch_test.go index 096afa28f4..6fe7305d45 100644 --- a/integrations/change_default_branch_test.go +++ b/integrations/change_default_branch_test.go @@ -16,8 +16,8 @@ import ( func TestChangeDefaultBranch(t *testing.T) { defer prepareTestEnv(t)() - repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}).(*repo_model.Repository) - owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}).(*user_model.User) + repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) + owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) session := loginUser(t, owner.Name) branchesURL := fmt.Sprintf("/%s/%s/settings/branches", owner.Name, repo.Name) |