MCPcopy Create free account
hub / github.com/dropbox/dbxcli / TestFormatTimeDefault

Function TestFormatTimeDefault

cmd/format_test.go:11–20  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

9)
10
11func TestFormatTimeDefault(t *testing.T) {
12 ts := time.Now().Add(-2 * time.Hour)
13 got := formatTime(ts, listOptions{})
14 if got == "" {
15 t.Error("formatTime default returned empty")
16 }
17 if got == ts.Format(time.RFC3339) {
18 t.Error("default should be relative, not rfc3339")
19 }
20}
21
22func TestFormatTimeShort(t *testing.T) {
23 ts := time.Date(2025, 3, 15, 10, 30, 0, 0, time.UTC)

Callers

nothing calls this directly

Calls 2

formatTimeFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected