(t *testing.T)
| 101 | } |
| 102 | |
| 103 | func TestNewServer_DevMode(t *testing.T) { |
| 104 | dir := createTestTaskDir(t) |
| 105 | cfg := Config{ |
| 106 | Port: 0, |
| 107 | ScanDir: dir, |
| 108 | Dev: true, |
| 109 | } |
| 110 | |
| 111 | s := NewServer(cfg) |
| 112 | |
| 113 | if s == nil { |
| 114 | t.Fatal("expected non-nil server") |
| 115 | return |
| 116 | } |
| 117 | if !s.config.Dev { |
| 118 | t.Error("expected dev mode to be enabled") |
| 119 | } |
| 120 | } |
| 121 | |
| 122 | func TestNewServer_ReadOnlyMode(t *testing.T) { |
| 123 | dir := createTestTaskDir(t) |
nothing calls this directly
no test coverage detected