(t *testing.T)
| 130 | } |
| 131 | |
| 132 | func TestTodoAddEmpty(t *testing.T) { |
| 133 | server := todoServer(t) |
| 134 | defer server.Close() |
| 135 | |
| 136 | _, err := runTodoAdd(t, server) |
| 137 | if err == nil { |
| 138 | t.Fatal("expected error for missing title") |
| 139 | } |
| 140 | if !strings.Contains(err.Error(), "title is required") { |
| 141 | t.Errorf("error = %q, want to contain %q", err.Error(), "title is required") |
| 142 | } |
| 143 | } |
| 144 | |
| 145 | func TestTodoAddStdin(t *testing.T) { |
| 146 | server := todoServer(t) |
nothing calls this directly
no test coverage detected