(t *testing.T)
| 199 | } |
| 200 | |
| 201 | func TestFormatFileMetadataWithOptsClientTime(t *testing.T) { |
| 202 | server := time.Date(2025, 1, 1, 0, 0, 0, 0, time.UTC) |
| 203 | client := time.Date(2024, 6, 15, 12, 0, 0, 0, time.UTC) |
| 204 | meta := &files.FileMetadata{ |
| 205 | Metadata: files.Metadata{PathDisplay: "/test.txt"}, |
| 206 | Rev: "abc", |
| 207 | Size: 1024, |
| 208 | ServerModified: dropbox.DBXTime(server), |
| 209 | ClientModified: dropbox.DBXTime(client), |
| 210 | } |
| 211 | |
| 212 | got := formatFileMetadataWithOpts(meta, listOptions{long: true, timeField: "client", timeFormat: "short"}) |
| 213 | if !stringContains(got, "2024-06-15 12:00") { |
| 214 | t.Errorf("client time format should show client modified, got %q", got) |
| 215 | } |
| 216 | } |
nothing calls this directly
no test coverage detected