Commit 1c4c73c6 authored by feld's avatar feld
Browse files

Add test for AnalyzeMetadata upload filter fetching dimensions from a video

parent 8443f822
......@@ -16,4 +16,15 @@ test "adds the image dimensions" 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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment