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

Function TestJournalWriteTwoPositionalsInvalidDate

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

Source from the content-addressed store, hash-verified

141}
142
143func TestJournalWriteTwoPositionalsInvalidDate(t *testing.T) {
144 server := journalServer(t)
145 defer server.Close()
146
147 _, err := runJournalWrite(t, server, "not-a-date", "Content")
148 if err == nil {
149 t.Fatal("expected error for invalid date in 2-arg form")
150 }
151 if !strings.Contains(err.Error(), "YYYY-MM-DD") {
152 t.Errorf("error = %q, want to mention YYYY-MM-DD", err.Error())
153 }
154}
155
156func TestJournalWriteConflictFlagAndTwoPositionals(t *testing.T) {
157 server := journalServer(t)

Callers

nothing calls this directly

Calls 3

journalServerFunction · 0.85
runJournalWriteFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected