Skip to content

Commit

Permalink
Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mukulmantosh committed Sep 26, 2024
1 parent d206ca5 commit c19226c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/tests/restaurant/restaurant_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,15 @@ func TestRestaurant(t *testing.T) {

})

t.Run("Restaurant::GetById", func(t *testing.T) {
url := fmt.Sprintf("/restaurant/%d", RestaurantResponseID)
req, _ := http.NewRequest(http.MethodGet, url, nil)
req.Header.Set("Content-Type", "application/json")
w := httptest.NewRecorder()
testServer.Gin.ServeHTTP(w, req)
assert.Equal(t, http.StatusOK, w.Code)
})

t.Run("Restaurant::Delete", func(t *testing.T) {
url := fmt.Sprintf("/restaurant/%d", RestaurantResponseID)
req, _ := http.NewRequest(http.MethodDelete, url, nil)
Expand Down

0 comments on commit c19226c

Please sign in to comment.