Skip to content

Commit 1c01eee

Browse files
committed
test: improve coverage for PullIsMergeable method call
Signed-off-by: Caio Augusto <[email protected]>
1 parent f719d64 commit 1c01eee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/events/vcs/gitlab_client_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ func TestGitlabClient_PullIsMergeable(t *testing.T) {
833833
w.Write([]byte(response)) // nolint: errcheck
834834
case fmt.Sprintf("/api/v4/projects/runatlantis%%2Fatlantis/merge_requests/%v/approvals", needsApprovalMR):
835835
w.WriteHeader(http.StatusOK)
836-
response := fmt.Sprintf(`{"id":%v,"name":"%s","rule_type":"regular","report_type":null,"eligible_approvers":[{"id":5,"name":"John Doe","username":"jdoe","state":"active","avatar_url":"https://www.gravatar.com/avatar/0?s=80&d=identicon","web_url":"http://localhost/jdoe"},{"id":50,"name":"Group Member 1","username":"group_member_1","state":"active","avatar_url":"https://www.gravatar.com/avatar/0?s=80&d=identicon","web_url":"http://localhost/group_member_1"}],"approvals_required":0,"approvals_left":2,"users":[{"id":5,"name":"John Doe","username":"jdoe","state":"active","avatar_url":"https://www.gravatar.com/avatar/0?s=80&d=identicon","web_url":"http://localhost/jdoe"}],"contains_hidden_groups":false}`, needsApprovalMR, c.statusName)
836+
response := fmt.Sprintf(`{"id":%v,"name":"%s","rule_type":"regular","report_type":null,"eligible_approvers":[{"id":5,"name":"John Doe","username":"jdoe","state":"active","avatar_url":"https://www.gravatar.com/avatar/0?s=80&d=identicon","web_url":"http://localhost/jdoe"},{"id":50,"name":"Group Member 1","username":"group_member_1","state":"active","avatar_url":"https://www.gravatar.com/avatar/0?s=80&d=identicon","web_url":"http://localhost/group_member_1"}],"approvals_required":0,"approvals_left":3,"users":[{"id":5,"name":"John Doe","username":"jdoe","state":"active","avatar_url":"https://www.gravatar.com/avatar/0?s=80&d=identicon","web_url":"http://localhost/jdoe"}],"contains_hidden_groups":false}`, needsApprovalMR, c.statusName)
837837
w.Write([]byte(response)) // nolint: errcheck
838838
case fmt.Sprintf("/api/v4/projects/runatlantis%%2Fatlantis/merge_requests/%v", noHeadPipelineMR):
839839
w.WriteHeader(http.StatusOK)

0 commit comments

Comments
 (0)