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

Commit

Permalink
Updated draft_notes_test.go
Browse files Browse the repository at this point in the history
  • Loading branch information
harrisoncramer committed Mar 30, 2024
1 parent 394e800 commit dd468ec
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions draft_notes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

0 comments on commit dd468ec

Please sign in to comment.