summaryrefslogtreecommitdiffstats
path: root/models/pull_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/pull_test.go')
-rw-r--r--models/pull_test.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/models/pull_test.go b/models/pull_test.go
index f0352be35e..b8794e1311 100644
--- a/models/pull_test.go
+++ b/models/pull_test.go
@@ -225,11 +225,9 @@ func TestChangeUsernameInPullRequests(t *testing.T) {
assert.NoError(t, PrepareTestDatabase())
const newUsername = "newusername"
assert.NoError(t, ChangeUsernameInPullRequests("user1", newUsername))
- sess := x.NewSession()
- defer sess.Close()
prs := make([]*PullRequest, 0, 10)
- assert.NoError(t, sess.Where("head_user_name = ?", newUsername).Find(&prs))
+ assert.NoError(t, x.Where("head_user_name = ?", newUsername).Find(&prs))
assert.Len(t, prs, 2)
for _, pr := range prs {
assert.Equal(t, newUsername, pr.HeadUserName)