MCPcopy Create free account
hub / github.com/basecamp/hey-cli / TestTodoAddEmpty

Function TestTodoAddEmpty

internal/cmd/todo_test.go:132–143  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

130}
131
132func 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
145func TestTodoAddStdin(t *testing.T) {
146 server := todoServer(t)

Callers

nothing calls this directly

Calls 3

todoServerFunction · 0.85
runTodoAddFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected