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

Commit dd468ec

Browse files
Updated draft_notes_test.go
1 parent 394e800 commit dd468ec

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

draft_notes_test.go

+24
Original file line numberDiff line numberDiff line change
@@ -189,3 +189,27 @@ func TestDeleteDraftNote(t *testing.T) {
189189
t.Errorf("DraftNotes.DeleteDraftNote returned error: %v", err)
190190
}
191191
}
192+
193+
func TestPublishDraftNote(t *testing.T) {
194+
mux, client := setup(t)
195+
mux.HandleFunc("/api/v4/projects/1/merge_requests/4329/draft_notes/3/publish", func(w http.ResponseWriter, r *http.Request) {
196+
testMethod(t, r, http.MethodPut)
197+
})
198+
199+
_, err := client.DraftNotes.PublishDraftNote("1", 4329, 3)
200+
if err != nil {
201+
t.Errorf("DraftNotes.PublishDraftNote returned error: %v", err)
202+
}
203+
}
204+
205+
func TestPublishAllDraftNotes(t *testing.T) {
206+
mux, client := setup(t)
207+
mux.HandleFunc("/api/v4/projects/1/merge_requests/4329/draft_notes/bulk_publish", func(w http.ResponseWriter, r *http.Request) {
208+
testMethod(t, r, http.MethodPost)
209+
})
210+
211+
_, err := client.DraftNotes.PublishAllDraftNotes("1", 4329)
212+
if err != nil {
213+
t.Errorf("DraftNotes.PublishAllDraftNotes returned error: %v", err)
214+
}
215+
}

0 commit comments

Comments
 (0)