(t *testing.T)
| 1119 | } |
| 1120 | |
| 1121 | func TestDropboxClientModifiedUsesUTCSecondPrecision(t *testing.T) { |
| 1122 | input := time.Date(2026, 7, 1, 12, 34, 56, 600*1e6, time.FixedZone("source", -7*60*60)) |
| 1123 | |
| 1124 | got := dropboxClientModified(input) |
| 1125 | if got == nil { |
| 1126 | t.Fatal("dropboxClientModified returned nil") |
| 1127 | } |
| 1128 | |
| 1129 | gotTime := time.Time(*got) |
| 1130 | want := input.UTC().Round(time.Second) |
| 1131 | if !gotTime.Equal(want) { |
| 1132 | t.Fatalf("client modified = %s, want %s", gotTime.Format(time.RFC3339Nano), want.Format(time.RFC3339Nano)) |
| 1133 | } |
| 1134 | if gotTime.Location() != time.UTC { |
| 1135 | t.Fatalf("client modified location = %v, want UTC", gotTime.Location()) |
| 1136 | } |
| 1137 | } |
| 1138 | |
| 1139 | func TestPutFileUsesSourceModifiedTime(t *testing.T) { |
| 1140 | tmpFile := filepath.Join(t.TempDir(), "mtime.txt") |
nothing calls this directly
no test coverage detected