(t *testing.T)
| 248 | } |
| 249 | |
| 250 | func newFakeLicenseAPI(t *testing.T) http.Handler { |
| 251 | r := chi.NewRouter() |
| 252 | a := &fakeLicenseAPI{t: t, r: r} |
| 253 | r.NotFound(a.notFound) |
| 254 | r.Post("/api/v2/licenses", a.postLicense) |
| 255 | r.Get("/api/v2/licenses", a.licenses) |
| 256 | r.Get("/api/v2/buildinfo", a.noop) |
| 257 | r.Get("/api/v2/users/me", a.noop) |
| 258 | r.Delete("/api/v2/licenses/{id}", a.deleteLicense) |
| 259 | r.Get("/api/v2/entitlements", a.entitlements) |
| 260 | return r |
| 261 | } |
| 262 | |
| 263 | type fakeLicenseAPI struct { |
| 264 | t *testing.T |
no test coverage detected