Skip to content

Commit

Permalink
write workflow request unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
MahtabBukhari committed Nov 19, 2024
1 parent fc84556 commit 3aeb685
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions handlers/workflow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func TestHandleWorkflowRequest(t *testing.T) {
}
body, _ := json.Marshal(request)

req := httptest.NewRequest(http.MethodPost, "/workflow/request", bytes.NewBuffer(body))
req := httptest.NewRequest(http.MethodPost, "/workflows/request", bytes.NewBuffer(body))
req.Header.Set("Content-Type", "application/json")
w := httptest.NewRecorder()

Expand All @@ -41,7 +41,7 @@ func TestHandleWorkflowRequest(t *testing.T) {
})

t.Run("invalid JSON format", func(t *testing.T) {
req := httptest.NewRequest(http.MethodPost, "/workflow/request", bytes.NewBuffer([]byte("invalid-json")))
req := httptest.NewRequest(http.MethodPost, "/workflows/request", bytes.NewBuffer([]byte("invalid-json")))
req.Header.Set("Content-Type", "application/json")
w := httptest.NewRecorder()

Expand All @@ -57,7 +57,7 @@ func TestHandleWorkflowRequest(t *testing.T) {
}
body, _ := json.Marshal(request)

req := httptest.NewRequest(http.MethodPost, "/workflow/request", bytes.NewBuffer(body))
req := httptest.NewRequest(http.MethodPost, "/workflows/request", bytes.NewBuffer(body))
req.Header.Set("Content-Type", "application/json")
w := httptest.NewRecorder()

Expand Down

0 comments on commit 3aeb685

Please sign in to comment.