Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F85806198
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
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
Details
Attached
Mime Type
text/x-diff
Expires
Mon, Oct 12, 3:51 PM (1 d, 17 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1786352
Default Alt Text
(1 KB)
Attached To
Mode
rPUBE pleroma-upstream
Attached
Detach File
Event Timeline
Log In to Comment