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

Function TestFormatTimestampUTC

internal/cmd/sdk_test.go:10–20  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

8 "github.com/basecamp/hey-sdk/go/pkg/hey"
9)
10
11// The SDK asks for this at runtime, when a 401 comes back and it wants to know whether
12// these credentials can be renewed before surfacing the failure. A signature that drifts
13// out of shape would go unnoticed there until a token expired mid-session.
14var _ hey.TokenRefresher = (*cliAuthStrategy)(nil)
15
16func TestFormatTimestampUTC(t *testing.T) {
17 ts := time.Date(2024, 1, 15, 0, 0, 0, 0, time.UTC)
18 got := formatTimestamp(ts)
19 want := "2024-01-15T00:00"
20 if got != want {
21 t.Errorf("formatTimestamp = %q, want %q", got, want)
22 }
23}

Callers

nothing calls this directly

Calls 1

formatTimestampFunction · 0.70

Tested by

no test coverage detected