Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1817 from diggerhq/fix-list-merge-reques-diffs-typo
Browse files Browse the repository at this point in the history
Fix ListMergeRequesDiffs typo, ListMergeRequesDiffs->ListMergeRequestDiffs
  • Loading branch information
svanharmelen authored Oct 6, 2023
2 parents 99e75d5 + 822d1b5 commit c7a9790
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions merge_requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ type GetMergeRequestChangesOptions struct {
// its files and changes.
//
// Deprecated: This endpoint has been replaced by
// MergeRequestsService.ListMergeRequesDiffs()
// MergeRequestsService.ListMergeRequestDiffs()
//
// GitLab API docs:
// https://docs.gitlab.com/ee/api/merge_requests.html#get-single-merge-request-changes
Expand All @@ -493,7 +493,7 @@ func (s *MergeRequestsService) GetMergeRequestChanges(pid interface{}, mergeRequ
return m, resp, nil
}

// ListMergeRequestDiffsOptions represents the available ListMergeRequesDiffs()
// ListMergeRequestDiffsOptions represents the available ListMergeRequestDiffs()
// options.
//
// GitLab API docs:
Expand Down
6 changes: 3 additions & 3 deletions merge_requests_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ func TestGetIssuesClosedOnMerge_Jira(t *testing.T) {
assert.Equal(t, "Title of this issue", issues[0].Title)
}

func TestListMergeRequesDiffs(t *testing.T) {
func TestListMergeRequestDiffs(t *testing.T) {
mux, client := setup(t)

mux.HandleFunc("/api/v4/projects/1/merge_requests/1/diffs", func(w http.ResponseWriter, r *http.Request) {
Expand All @@ -303,7 +303,7 @@ func TestListMergeRequesDiffs(t *testing.T) {

diffs, _, err := client.MergeRequests.ListMergeRequestDiffs(1, 1, opts)
if err != nil {
t.Errorf("MergeRequests.ListMergeRequesDiffs returned error: %v", err)
t.Errorf("MergeRequests.ListMergeRequestDiffs returned error: %v", err)
}

want := []*MergeRequestDiff{
Expand All @@ -330,7 +330,7 @@ func TestListMergeRequesDiffs(t *testing.T) {
}

if !reflect.DeepEqual(want, diffs) {
t.Errorf("MergeRequests.ListMergeRequesDiffs returned %+v, want %+v", diffs, want)
t.Errorf("MergeRequests.ListMergeRequestDiffs returned %+v, want %+v", diffs, want)
}
}

Expand Down

0 comments on commit c7a9790

Please sign in to comment.