From dd468ecbe9ba67fbbcd3a9fcec58bdf4b5f2d37c Mon Sep 17 00:00:00 2001 From: Harrison Cramer Date: Sat, 30 Mar 2024 13:07:43 -0400 Subject: [PATCH] Updated draft_notes_test.go --- draft_notes_test.go | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/draft_notes_test.go b/draft_notes_test.go index 7302f3565..48a62dd21 100644 --- a/draft_notes_test.go +++ b/draft_notes_test.go @@ -189,3 +189,27 @@ func TestDeleteDraftNote(t *testing.T) { t.Errorf("DraftNotes.DeleteDraftNote returned error: %v", err) } } + +func TestPublishDraftNote(t *testing.T) { + mux, client := setup(t) + mux.HandleFunc("/api/v4/projects/1/merge_requests/4329/draft_notes/3/publish", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, http.MethodPut) + }) + + _, err := client.DraftNotes.PublishDraftNote("1", 4329, 3) + if err != nil { + t.Errorf("DraftNotes.PublishDraftNote returned error: %v", err) + } +} + +func TestPublishAllDraftNotes(t *testing.T) { + mux, client := setup(t) + mux.HandleFunc("/api/v4/projects/1/merge_requests/4329/draft_notes/bulk_publish", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, http.MethodPost) + }) + + _, err := client.DraftNotes.PublishAllDraftNotes("1", 4329) + if err != nil { + t.Errorf("DraftNotes.PublishAllDraftNotes returned error: %v", err) + } +}