mirror of
https://github.com/go-gitea/gitea.git
synced 2025-02-26 19:53:58 +08:00
Update consistency.go
This commit is contained in:
parent
13ddbd115a
commit
e38b87516f
@ -179,6 +179,13 @@ func init() {
|
||||
}
|
||||
}
|
||||
|
||||
checkForConversationConsistency := func(t assert.TestingT, bean any) {
|
||||
conversation := reflectionWrap(bean)
|
||||
typeComment := modelsCommentTypeComment
|
||||
actual := GetCountByCond(t, "comment", builder.Eq{"`type`": typeComment, "conversation_id": conversation.int("ID")})
|
||||
assert.EqualValues(t, conversation.int("NumComments"), actual, "Unexpected number of comments for issue id: %d", conversation.int("ID"))
|
||||
}
|
||||
|
||||
consistencyCheckMap["user"] = checkForUserConsistency
|
||||
consistencyCheckMap["repository"] = checkForRepoConsistency
|
||||
consistencyCheckMap["issue"] = checkForIssueConsistency
|
||||
@ -187,4 +194,5 @@ func init() {
|
||||
consistencyCheckMap["label"] = checkForLabelConsistency
|
||||
consistencyCheckMap["team"] = checkForTeamConsistency
|
||||
consistencyCheckMap["action"] = checkForActionConsistency
|
||||
consistencyCheckMap["conversation"] = checkForConversationConsistency
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user