Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
carsonreinke committed Mar 18, 2023
1 parent be101f7 commit dc93d00
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion downloader/downloader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package downloader
import (
"encoding/json"
"io/ioutil"
"mime"
"os"
"path/filepath"
"testing"
Expand Down Expand Up @@ -124,7 +125,9 @@ func TestCreateFileName(t *testing.T) {
item.MediaMetadata.CreationTime = "2019-10-13T17:33:43Z"

have := downloader.createFileName(item, 0)
want := "13_34567890.jpe"
// Extensions can vary by system and will just defer to that for the correct extension
ext, _ := mime.ExtensionsByType(item.MimeType)
want := "13_34567890" + ext[0]

if have != want {
t.Errorf("downloader.createFileName() = %v; want %v", have, want)
Expand Down

0 comments on commit dc93d00

Please sign in to comment.