mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-06-13 08:15:14 +08:00
Fixed assert statements. (#16089)
This commit is contained in:
integrations
api_admin_test.goapi_gpg_keys_test.goapi_issue_test.goapi_notification_test.goapi_oauth2_apps_test.goapi_org_test.goapi_pull_review_test.goapi_repo_tags_test.goapi_repo_teams_test.goapi_repo_topic_test.goapi_team_test.goorg_test.gorepo_commits_test.gorepo_test.go
models
attachment_test.goissue_stopwatch_test.goissue_watch_test.goissue_xref_test.gooauth2_application_test.goorg_test.gorepo_generate_test.gorepo_test.gotopic_test.gouser_heatmap_test.gouser_mail_test.gouser_openid_test.gouser_test.go
modules
auth/pam
base
git
indexer/code
lfs
log
markup/markdown
migrations
password
queue
repository
routers
services
@ -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
|
||||
|
Reference in New Issue
Block a user