Skip to content

Commit

Permalink
Cover all handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen-soltesz committed Feb 12, 2024
1 parent eddee21 commit dfd1a87
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions handler/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,17 @@ func TestServer_Reload(t *testing.T) {
}
})
}

func TestServer_LiveAndReady(t *testing.T) {
t.Run("success", func(t *testing.T) {
f := &fakeIataFinder{}
s := NewServer("fake", f)
rw := httptest.NewRecorder()
req := httptest.NewRequest(http.MethodGet, "/", nil)
s.Live(rw, req)
s.Ready(rw, req)

// TODO: remove once handler has a real implementation.
s.Register(rw, req)
})
}

0 comments on commit dfd1a87

Please sign in to comment.