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

Function TestGetTimeClient

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

Source from the content-addressed store, hash-verified

57}
58
59func TestGetTimeClient(t *testing.T) {
60 serverTime := time.Date(2025, 1, 1, 0, 0, 0, 0, time.UTC)
61 clientTime := time.Date(2024, 6, 1, 0, 0, 0, 0, time.UTC)
62 meta := &files.FileMetadata{
63 ServerModified: dropbox.DBXTime(serverTime),
64 ClientModified: dropbox.DBXTime(clientTime),
65 }
66
67 got := getTime(meta, listOptions{timeField: "client"})
68 if !got.Equal(clientTime) {
69 t.Errorf("getTime client = %v, want %v", got, clientTime)
70 }
71}
72
73func TestSortEntriesByName(t *testing.T) {
74 entries := []files.IsMetadata{

Callers

nothing calls this directly

Calls 1

getTimeFunction · 0.85

Tested by

no test coverage detected