Skip to content

Commit

Permalink
test (api) adding test for health
Browse files Browse the repository at this point in the history
  • Loading branch information
mironx committed Dec 20, 2024
1 parent 966334d commit f7594a1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions cmd/mcvs-stub-server/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,19 @@ import (
"github.com/stretchr/testify/assert"
)

func TestHealthHandler(t *testing.T) {
// given
handler := newHandler()

// when
httptestRecorder := httptest.NewRecorder()
httptestRequest := httptest.NewRequest("GET", "/health", nil)

// then
handler.health(httptestRecorder, httptestRequest)
assert.Equal(t, http.StatusOK, httptestRecorder.Code)
}

func TestResetHandler(t *testing.T) {
// given
handler := newHandler()
Expand Down

0 comments on commit f7594a1

Please sign in to comment.