Page MenuHomePhorge

No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None
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
@@ -1,19 +1,30 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Upload.Filter.AnalyzeMetadataTest do
use Pleroma.DataCase, async: true
alias Pleroma.Upload.Filter.AnalyzeMetadata
test "adds the image dimensions" do
upload = %Pleroma.Upload{
name: "an… image.jpg",
content_type: "image/jpeg",
path: Path.absname("test/fixtures/image.jpg"),
tempfile: Path.absname("test/fixtures/image.jpg")
}
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

File Metadata

Mime Type
text/x-diff
Expires
Mon, Oct 12, 3:51 PM (1 d, 16 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1786352
Default Alt Text
(1 KB)

Event Timeline