mirror of
https://github.com/go-gitea/gitea
synced 2024-12-25 02:55:59 +01:00
gofmt
Signed-off-by: Jonas Franz <info@jonasfranz.software>
This commit is contained in:
parent
bc9359222a
commit
58fb672d0d
@ -818,7 +818,7 @@ func fetchCodeComments(e Engine, issue *Issue, currentUser *User) (map[string]ma
|
||||
// If the review is pending only the author can see the comments
|
||||
if re.Type == ReviewTypePending &&
|
||||
(currentUser == nil || currentUser.ID != re.ReviewerID) {
|
||||
continue
|
||||
continue
|
||||
}
|
||||
comment.Review = re
|
||||
}
|
||||
|
@ -53,8 +53,8 @@ func TestReviewType_Icon(t *testing.T) {
|
||||
func TestFindReviews(t *testing.T) {
|
||||
assert.NoError(t, PrepareTestDatabase())
|
||||
reviews, err := FindReviews(FindReviewOptions{
|
||||
Type: ReviewTypeApprove,
|
||||
IssueID: 2,
|
||||
Type: ReviewTypeApprove,
|
||||
IssueID: 2,
|
||||
ReviewerID: 1,
|
||||
})
|
||||
assert.NoError(t, err)
|
||||
@ -71,7 +71,7 @@ func TestGetCurrentReview(t *testing.T) {
|
||||
assert.NoError(t, err)
|
||||
assert.NotNil(t, review)
|
||||
assert.Equal(t, ReviewTypePending, review.Type)
|
||||
assert.Equal(t, "Pending Review", review.Content )
|
||||
assert.Equal(t, "Pending Review", review.Content)
|
||||
|
||||
user2 := AssertExistsAndLoadBean(t, &User{ID: 2}).(*User)
|
||||
review2, err := GetCurrentReview(user2, issue)
|
||||
@ -87,9 +87,9 @@ func TestCreateReview(t *testing.T) {
|
||||
user := AssertExistsAndLoadBean(t, &User{ID: 1}).(*User)
|
||||
|
||||
review, err := CreateReview(CreateReviewOptions{
|
||||
Content: "New Review",
|
||||
Type: ReviewTypePending,
|
||||
Issue: issue,
|
||||
Content: "New Review",
|
||||
Type: ReviewTypePending,
|
||||
Issue: issue,
|
||||
Reviewer: user,
|
||||
})
|
||||
assert.NoError(t, err)
|
||||
|
Loading…
Reference in New Issue
Block a user