MCPcopy Create free account
hub / github.com/driangle/taskmd / TestNewServer_ReadOnlyMode

Function TestNewServer_ReadOnlyMode

apps/cli/internal/web/server_test.go:122–139  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

120}
121
122func TestNewServer_ReadOnlyMode(t *testing.T) {
123 dir := createTestTaskDir(t)
124 cfg := Config{
125 Port: 0,
126 ScanDir: dir,
127 ReadOnly: true,
128 Version: "1.0.0-test",
129 }
130
131 s := NewServer(cfg)
132
133 if !s.config.ReadOnly {
134 t.Error("expected read-only mode")
135 }
136 if s.config.Version != "1.0.0-test" {
137 t.Errorf("expected version '1.0.0-test', got %q", s.config.Version)
138 }
139}
140
141func TestMountFallback_ServesHTML(t *testing.T) {
142 dir := createTestTaskDir(t)

Callers

nothing calls this directly

Calls 3

createTestTaskDirFunction · 0.85
ErrorMethod · 0.80
NewServerFunction · 0.70

Tested by

no test coverage detected