Skip to content

Commit b6d2d6d

Browse files
committed
Update CSV export headers to include TMDB ID and adjust IMDb ID casing for consistency in tests
1 parent 13826ea commit b6d2d6d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pkg/export/letterboxd_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ func TestExportMovies(t *testing.T) {
181181

182182
// Verify file content
183183
fileContent := string(content)
184-
expectedHeaders := "Title,Year,WatchedDate,Rating10,IMDb ID,Rewatch"
184+
expectedHeaders := "Title,Year,WatchedDate,Rating10,imdbID,tmdbID,Rewatch"
185185
if len(fileContent) == 0 || content[0] == 0 {
186186
t.Error("Export file is empty")
187187
}
@@ -286,18 +286,20 @@ func TestExportCollectionMovies(t *testing.T) {
286286
assert.NoError(t, err)
287287

288288
// Check the header
289-
assert.Equal(t, []string{"Title", "Year", "CollectedDate", "IMDb ID"}, records[0])
289+
assert.Equal(t, []string{"Title", "Year", "CollectedDate", "imdbID", "tmdbID"}, records[0])
290290

291291
// Check movie records
292292
assert.Equal(t, "The Dark Knight", records[1][0])
293293
assert.Equal(t, "2008", records[1][1])
294294
assert.Equal(t, "2023-01-15", records[1][2])
295295
assert.Equal(t, "tt0468569", records[1][3])
296+
assert.Equal(t, "155", records[1][4])
296297

297298
assert.Equal(t, "Inception", records[2][0])
298299
assert.Equal(t, "2010", records[2][1])
299300
assert.Equal(t, "2023-03-20", records[2][2])
300301
assert.Equal(t, "tt1375666", records[2][3])
302+
assert.Equal(t, "27205", records[2][4])
301303
}
302304

303305
func TestExportShows(t *testing.T) {

0 commit comments

Comments
 (0)