1
0
Fork 0
forked from forgejo/forgejo

Fixed assert statements. (#16089)

This commit is contained in:
KN4CK3R 2021-06-07 07:27:09 +02:00 committed by GitHub
parent 51775f65bc
commit 3607f79d78
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
56 changed files with 227 additions and 228 deletions

View file

@ -25,7 +25,7 @@ func TestXRef_AddCrossReferences(t *testing.T) {
ref := AssertExistsAndLoadBean(t, &Comment{IssueID: itarget.ID, RefIssueID: pr.ID, RefCommentID: 0}).(*Comment)
assert.Equal(t, CommentTypePullRef, ref.Type)
assert.Equal(t, pr.RepoID, ref.RefRepoID)
assert.Equal(t, true, ref.RefIsPull)
assert.True(t, ref.RefIsPull)
assert.Equal(t, references.XRefActionCloses, ref.RefAction)
// Comment on PR to reopen issue #1
@ -34,7 +34,7 @@ func TestXRef_AddCrossReferences(t *testing.T) {
ref = AssertExistsAndLoadBean(t, &Comment{IssueID: itarget.ID, RefIssueID: pr.ID, RefCommentID: c.ID}).(*Comment)
assert.Equal(t, CommentTypeCommentRef, ref.Type)
assert.Equal(t, pr.RepoID, ref.RefRepoID)
assert.Equal(t, true, ref.RefIsPull)
assert.True(t, ref.RefIsPull)
assert.Equal(t, references.XRefActionReopens, ref.RefAction)
// Issue mentioning issue #1
@ -43,7 +43,7 @@ func TestXRef_AddCrossReferences(t *testing.T) {
ref = AssertExistsAndLoadBean(t, &Comment{IssueID: itarget.ID, RefIssueID: i.ID, RefCommentID: 0}).(*Comment)
assert.Equal(t, CommentTypeIssueRef, ref.Type)
assert.Equal(t, pr.RepoID, ref.RefRepoID)
assert.Equal(t, false, ref.RefIsPull)
assert.False(t, ref.RefIsPull)
assert.Equal(t, references.XRefActionNone, ref.RefAction)
// Issue #4 to test against
@ -55,7 +55,7 @@ func TestXRef_AddCrossReferences(t *testing.T) {
ref = AssertExistsAndLoadBean(t, &Comment{IssueID: itarget.ID, RefIssueID: i.ID, RefCommentID: 0}).(*Comment)
assert.Equal(t, CommentTypeIssueRef, ref.Type)
assert.Equal(t, i.RepoID, ref.RefRepoID)
assert.Equal(t, false, ref.RefIsPull)
assert.False(t, ref.RefIsPull)
assert.Equal(t, references.XRefActionNone, ref.RefAction)
// Cross-reference to issue #4 with no permission