MCPcopy Create free account
hub / github.com/buggregator/server / TestAPI_Version

Function TestAPI_Version

internal/server/http/api_test.go:51–66  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

49}
50
51func TestAPI_Version(t *testing.T) {
52 mux, _ := setupAPI(t)
53
54 r := httptest.NewRequest("GET", "/api/version", nil)
55 w := httptest.NewRecorder()
56 mux.ServeHTTP(w, r)
57
58 if w.Code != 200 {
59 t.Fatalf("status = %d", w.Code)
60 }
61 var resp map[string]string
62 json.NewDecoder(w.Body).Decode(&resp)
63 if resp["version"] != "test-version" {
64 t.Errorf("version = %q", resp["version"])
65 }
66}
67
68func TestAPI_Settings(t *testing.T) {
69 mux, _ := setupAPI(t)

Callers

nothing calls this directly

Calls 2

setupAPIFunction · 0.85
ServeHTTPMethod · 0.80

Tested by

no test coverage detected