Add test for AnalyzeMetadata upload filter fetching dimensions from a video
This commit is contained in:
parent
8443f82247
commit
1c4c73c6a0
BIN
test/fixtures/video.mp4
vendored
Normal file
BIN
test/fixtures/video.mp4
vendored
Normal file
Binary file not shown.
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue