diff --git a/test/fixtures/video.mp4 b/test/fixtures/video.mp4 new file mode 100644 index 000000000..2021e3a5b Binary files /dev/null and b/test/fixtures/video.mp4 differ diff --git a/test/pleroma/upload/filter/analyze_metadata_test.exs b/test/pleroma/upload/filter/analyze_metadata_test.exs index 6f0e432ef..488743952 100644 --- a/test/pleroma/upload/filter/analyze_metadata_test.exs +++ b/test/pleroma/upload/filter/analyze_metadata_test.exs @@ -16,4 +16,15 @@ defmodule Pleroma.Upload.Filter.AnalyzeMetadataTest do assert {:ok, :filtered, %{width: 1024, height: 768}} = AnalyzeMetadata.filter(upload) end + + test "adds the video dimensions" do + upload = %Pleroma.Upload{ + name: "coolvideo.mp4", + content_type: "video/mp4", + path: Path.absname("test/fixtures/video.mp4"), + tempfile: Path.absname("test/fixtures/video.mp4") + } + + assert {:ok, :filtered, %{width: 480, height: 480}} = AnalyzeMetadata.filter(upload) + end end