Skip to content

Commit

Permalink
tests: fix TestGetContentType
Browse files Browse the repository at this point in the history
  • Loading branch information
hayzamjs committed Dec 25, 2024
1 parent e6f02a8 commit 9b53cf3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions utils/strings.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ func GetContentType(filename string) string {
if contentType, ok := contentTypes[ext]; ok {
return contentType
}

return "application/octet-stream"
}

Expand Down
2 changes: 1 addition & 1 deletion utils/strings_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ func TestGetContentType(t *testing.T) {
{"photo.jpeg", "image/jpeg"},
{"animation.gif", "image/gif"},
{"icon.svg", "image/svg+xml"},
{"document.pdf", "application/octet-stream"},
{"document.pdf", "application/pdf"},
{"FILE.HTML", "text/html"},
{"path/to/file.CSS", "text/css"},
}
Expand Down

0 comments on commit 9b53cf3

Please sign in to comment.