diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2021-06-07 07:27:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-07 07:27:09 +0200 |
commit | 3607f79d7869046d919fed05a21b55b6e61df1fa (patch) | |
tree | 9a176a4d5b67ac3a81ae210e9164d81959221ce0 /models/issue_xref_test.go | |
parent | 51775f65bc933843199320b040186703a2bb9f51 (diff) | |
download | gitea-3607f79d7869046d919fed05a21b55b6e61df1fa.tar.gz gitea-3607f79d7869046d919fed05a21b55b6e61df1fa.zip |
Fixed assert statements. (#16089)
Diffstat (limited to 'models/issue_xref_test.go')
-rw-r--r-- | models/issue_xref_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/models/issue_xref_test.go b/models/issue_xref_test.go index 936d1124be..f7a1adb083 100644 --- a/models/issue_xref_test.go +++ b/models/issue_xref_test.go @@ -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 |