Преглед изворни кода

Add test for AnalyzeMetadata upload filter fetching dimensions from a video

cycles-ensure-plug
Mark Felder пре 3 година
родитељ
комит
1c4c73c6a0
2 измењених фајлова са 11 додато и 0 уклоњено
  1. BIN
      test/fixtures/video.mp4
  2. +11
    -0
      test/pleroma/upload/filter/analyze_metadata_test.exs

BIN
test/fixtures/video.mp4 Прегледај датотеку


+ 11
- 0
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

Loading…
Откажи
Сачувај