summaryrefslogtreecommitdiffstats
path: root/models/issue_user_test.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2019-09-24 13:02:49 +0800
committerGitHub <noreply@github.com>2019-09-24 13:02:49 +0800
commit5a438ee3c0303efcb9d1935ff521917fe8a109e8 (patch)
tree8f36452631fc8a6d077addbbf857da6d50024a0a /models/issue_user_test.go
parent730065a3dc72683460b95ba1486dba8ec355a373 (diff)
downloadgitea-5a438ee3c0303efcb9d1935ff521917fe8a109e8.tar.gz
gitea-5a438ee3c0303efcb9d1935ff521917fe8a109e8.zip
Move all mail related codes from models to services/mailer (#7200)
* move all mail related codes from models to modules/mailer * fix lint * use DBContext instead Engine * use WithContext not WithEngine * Use DBContext instead of Engine * don't use defer when sess.Close() * move DBContext to context.go and add some methods * move mailer from modules/ to services * fix lint * fix tests * fix fmt * add gitea copyright * fix tests * don't expose db functions * make code clear * add DefaultDBContext * fix build * fix bug
Diffstat (limited to 'models/issue_user_test.go')
-rw-r--r--models/issue_user_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/issue_user_test.go b/models/issue_user_test.go
index a333bc8619..a57ab33f9e 100644
--- a/models/issue_user_test.go
+++ b/models/issue_user_test.go
@@ -50,7 +50,7 @@ func TestUpdateIssueUsersByMentions(t *testing.T) {
issue := AssertExistsAndLoadBean(t, &Issue{ID: 1}).(*Issue)
uids := []int64{2, 5}
- assert.NoError(t, UpdateIssueUsersByMentions(x, issue.ID, uids))
+ assert.NoError(t, UpdateIssueUsersByMentions(DefaultDBContext(), issue.ID, uids))
for _, uid := range uids {
AssertExistsAndLoadBean(t, &IssueUser{IssueID: issue.ID, UID: uid}, "is_mentioned=1")
}