| 57 | } |
| 58 | |
| 59 | func 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 | |
| 73 | func TestSortEntriesByName(t *testing.T) { |
| 74 | entries := []files.IsMetadata{ |