aboutsummaryrefslogtreecommitdiffstats
path: root/models/issue_dependency_test.go
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2022-05-03 21:46:28 +0200
committerGitHub <noreply@github.com>2022-05-03 21:46:28 +0200
commit92f139d091c906cc6d30599101d45c62a208f585 (patch)
treee7be0dfc3cd9ae0611bd7cfa11cc1ee277e756fd /models/issue_dependency_test.go
parent730420b6b32414db7fcd12ede87712b0f960de7b (diff)
downloadgitea-92f139d091c906cc6d30599101d45c62a208f585.tar.gz
gitea-92f139d091c906cc6d30599101d45c62a208f585.zip
Use for a repo action one database transaction (#19576)
... more context (part of #9307)
Diffstat (limited to 'models/issue_dependency_test.go')
-rw-r--r--models/issue_dependency_test.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/models/issue_dependency_test.go b/models/issue_dependency_test.go
index 1789de5dc0..345a9077cd 100644
--- a/models/issue_dependency_test.go
+++ b/models/issue_dependency_test.go
@@ -7,6 +7,7 @@ package models
import (
"testing"
+ "code.gitea.io/gitea/models/db"
"code.gitea.io/gitea/models/unittest"
user_model "code.gitea.io/gitea/models/user"
@@ -43,15 +44,15 @@ func TestCreateIssueDependency(t *testing.T) {
_ = unittest.AssertExistsAndLoadBean(t, &Comment{Type: CommentTypeAddDependency, PosterID: user1.ID, IssueID: issue1.ID})
// Check if dependencies left is correct
- left, err := IssueNoDependenciesLeft(issue1)
+ left, err := IssueNoDependenciesLeft(db.DefaultContext, issue1)
assert.NoError(t, err)
assert.False(t, left)
// Close #2 and check again
- _, err = ChangeIssueStatus(issue2, user1, true)
+ _, err = ChangeIssueStatus(db.DefaultContext, issue2, user1, true)
assert.NoError(t, err)
- left, err = IssueNoDependenciesLeft(issue1)
+ left, err = IssueNoDependenciesLeft(db.DefaultContext, issue1)
assert.NoError(t, err)
assert.True(t, left)