Move user/org deletion to services (#17673)

This commit is contained in:
KN4CK3R 2021-11-18 18:42:27 +01:00 committed by GitHub
parent 55be5fe339
commit f34151bdb2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 382 additions and 301 deletions

View file

@ -7,6 +7,7 @@ package admin
import (
"testing"
"code.gitea.io/gitea/models/db"
"code.gitea.io/gitea/models/unittest"
"github.com/stretchr/testify/assert"
@ -28,7 +29,7 @@ func TestCreateNotice(t *testing.T) {
Description: "test description",
}
unittest.AssertNotExistsBean(t, noticeBean)
assert.NoError(t, CreateNotice(noticeBean.Type, noticeBean.Description))
assert.NoError(t, CreateNotice(db.DefaultContext, noticeBean.Type, noticeBean.Description))
unittest.AssertExistsAndLoadBean(t, noticeBean)
}