aboutsummaryrefslogtreecommitdiffstats
path: root/models/issue_xref_test.go
diff options
context:
space:
mode:
authorguillep2k <18600385+guillep2k@users.noreply.github.com>2019-11-18 20:43:03 -0300
committerLauris BH <lauris@nix.lv>2019-11-19 01:43:03 +0200
commit2c2b9718e6f13dfa14b0ff8aafb15cfa1d85bc0e (patch)
tree154ad04abab829611351291ad73e86975dbe7f6a /models/issue_xref_test.go
parentf128e06ea608f07f279baa5c3e934b020fa57682 (diff)
downloadgitea-2c2b9718e6f13dfa14b0ff8aafb15cfa1d85bc0e.tar.gz
gitea-2c2b9718e6f13dfa14b0ff8aafb15cfa1d85bc0e.zip
Avoid re-issuing redundant cross-references. (#8734)
* Avoid re-issuing redundant cross-references. * Remove unused func; fix lint * Simplify code as suggested by @laftriks * Update test
Diffstat (limited to 'models/issue_xref_test.go')
-rw-r--r--models/issue_xref_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/models/issue_xref_test.go b/models/issue_xref_test.go
index 4fc6011d78..c13577e905 100644
--- a/models/issue_xref_test.go
+++ b/models/issue_xref_test.go
@@ -133,7 +133,7 @@ func testCreateIssue(t *testing.T, repo, doer int64, title, content string, ispu
assert.NoError(t, err)
i, err = getIssueByID(sess, i.ID)
assert.NoError(t, err)
- assert.NoError(t, i.addCrossReferences(sess, d))
+ assert.NoError(t, i.addCrossReferences(sess, d, false))
assert.NoError(t, sess.Commit())
return i
}
@@ -158,7 +158,7 @@ func testCreateComment(t *testing.T, repo, doer, issue int64, content string) *C
assert.NoError(t, sess.Begin())
_, err := sess.Insert(c)
assert.NoError(t, err)
- assert.NoError(t, c.addCrossReferences(sess, d))
+ assert.NoError(t, c.addCrossReferences(sess, d, false))
assert.NoError(t, sess.Commit())
return c
}