diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2022-08-16 04:22:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-16 04:22:25 +0200 |
commit | 86c85c19b625e6ddd99f220a13ee3b5c4cc398e1 (patch) | |
tree | 2545e0c31d5e240b1b168041601c2c24db63bae4 /services/migrations/migrate_test.go | |
parent | [skip ci] Updated translations via Crowdin (diff) | |
download | forgejo-86c85c19b625e6ddd99f220a13ee3b5c4cc398e1.tar.xz forgejo-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 'services/migrations/migrate_test.go')
-rw-r--r-- | services/migrations/migrate_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/services/migrations/migrate_test.go b/services/migrations/migrate_test.go index 53cfe6d3eb..3fc4034777 100644 --- a/services/migrations/migrate_test.go +++ b/services/migrations/migrate_test.go @@ -19,8 +19,8 @@ import ( func TestMigrateWhiteBlocklist(t *testing.T) { assert.NoError(t, unittest.PrepareTestDatabase()) - adminUser := unittest.AssertExistsAndLoadBean(t, &user_model.User{Name: "user1"}).(*user_model.User) - nonAdminUser := unittest.AssertExistsAndLoadBean(t, &user_model.User{Name: "user2"}).(*user_model.User) + adminUser := unittest.AssertExistsAndLoadBean(t, &user_model.User{Name: "user1"}) + nonAdminUser := unittest.AssertExistsAndLoadBean(t, &user_model.User{Name: "user2"}) setting.Migrations.AllowedDomains = "github.com" setting.Migrations.AllowLocalNetworks = false |