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

Function TestGetTimeServer

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

Source from the content-addressed store, hash-verified

38}
39
40func TestGetTimeServer(t *testing.T) {
41 serverTime := time.Date(2025, 1, 1, 0, 0, 0, 0, time.UTC)
42 clientTime := time.Date(2024, 6, 1, 0, 0, 0, 0, time.UTC)
43 meta := &files.FileMetadata{
44 ServerModified: dropbox.DBXTime(serverTime),
45 ClientModified: dropbox.DBXTime(clientTime),
46 }
47
48 got := getTime(meta, listOptions{timeField: "server"})
49 if !got.Equal(serverTime) {
50 t.Errorf("getTime server = %v, want %v", got, serverTime)
51 }
52
53 got = getTime(meta, listOptions{})
54 if !got.Equal(serverTime) {
55 t.Errorf("getTime default = %v, want %v", got, serverTime)
56 }
57}
58
59func TestGetTimeClient(t *testing.T) {
60 serverTime := time.Date(2025, 1, 1, 0, 0, 0, 0, time.UTC)

Callers

nothing calls this directly

Calls 1

getTimeFunction · 0.85

Tested by

no test coverage detected