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 /integrations/api_pull_review_test.go | |
parent | 51775f65bc933843199320b040186703a2bb9f51 (diff) | |
download | gitea-3607f79d7869046d919fed05a21b55b6e61df1fa.tar.gz gitea-3607f79d7869046d919fed05a21b55b6e61df1fa.zip |
Fixed assert statements. (#16089)
Diffstat (limited to 'integrations/api_pull_review_test.go')
-rw-r--r-- | integrations/api_pull_review_test.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/integrations/api_pull_review_test.go b/integrations/api_pull_review_test.go index 19b05d545b..ebe8539a82 100644 --- a/integrations/api_pull_review_test.go +++ b/integrations/api_pull_review_test.go @@ -37,15 +37,15 @@ func TestAPIPullReview(t *testing.T) { assert.EqualValues(t, 8, reviews[3].ID) assert.EqualValues(t, "APPROVED", reviews[3].State) assert.EqualValues(t, 0, reviews[3].CodeCommentsCount) - assert.EqualValues(t, true, reviews[3].Stale) - assert.EqualValues(t, false, reviews[3].Official) + assert.True(t, reviews[3].Stale) + assert.False(t, reviews[3].Official) assert.EqualValues(t, 10, reviews[5].ID) assert.EqualValues(t, "REQUEST_CHANGES", reviews[5].State) assert.EqualValues(t, 1, reviews[5].CodeCommentsCount) assert.EqualValues(t, -1, reviews[5].Reviewer.ID) // ghost user - assert.EqualValues(t, false, reviews[5].Stale) - assert.EqualValues(t, true, reviews[5].Official) + assert.False(t, reviews[5].Stale) + assert.True(t, reviews[5].Official) // test GetPullReview req = NewRequestf(t, http.MethodGet, "/api/v1/repos/%s/%s/pulls/%d/reviews/%d?token=%s", repo.OwnerName, repo.Name, pullIssue.Index, reviews[3].ID, token) @@ -118,14 +118,14 @@ func TestAPIPullReview(t *testing.T) { resp = session.MakeRequest(t, req, http.StatusOK) DecodeJSON(t, resp, &review) assert.EqualValues(t, 6, review.ID) - assert.EqualValues(t, true, review.Dismissed) + assert.True(t, review.Dismissed) // test dismiss review req = NewRequest(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/reviews/%d/undismissals?token=%s", repo.OwnerName, repo.Name, pullIssue.Index, review.ID, token)) resp = session.MakeRequest(t, req, http.StatusOK) DecodeJSON(t, resp, &review) assert.EqualValues(t, 6, review.ID) - assert.EqualValues(t, false, review.Dismissed) + assert.False(t, review.Dismissed) // test DeletePullReview req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/reviews?token=%s", repo.OwnerName, repo.Name, pullIssue.Index, token), &api.CreatePullReviewOptions{ @@ -151,15 +151,15 @@ func TestAPIPullReview(t *testing.T) { assert.EqualValues(t, 11, reviews[0].ID) assert.EqualValues(t, "REQUEST_REVIEW", reviews[0].State) assert.EqualValues(t, 0, reviews[0].CodeCommentsCount) - assert.EqualValues(t, false, reviews[0].Stale) - assert.EqualValues(t, true, reviews[0].Official) + assert.False(t, reviews[0].Stale) + assert.True(t, reviews[0].Official) assert.EqualValues(t, "test_team", reviews[0].ReviewerTeam.Name) assert.EqualValues(t, 12, reviews[1].ID) assert.EqualValues(t, "REQUEST_REVIEW", reviews[1].State) assert.EqualValues(t, 0, reviews[0].CodeCommentsCount) - assert.EqualValues(t, false, reviews[1].Stale) - assert.EqualValues(t, true, reviews[1].Official) + assert.False(t, reviews[1].Stale) + assert.True(t, reviews[1].Official) assert.EqualValues(t, 1, reviews[1].Reviewer.ID) } |