Browse Source

Merge branch '1.3.x'

tags/2.0.0-beta.1
Thomas Citharel 1 year ago
parent
commit
1bd32b4e36
No known key found for this signature in database GPG Key ID: A061B9DDE0CA0773
1 changed files with 25 additions and 0 deletions
  1. +25
    -0
      test/tasks/media/clean_orphan_test.exs

+ 25
- 0
test/tasks/media/clean_orphan_test.exs View File

@@ -137,4 +137,29 @@ defmodule Mix.Tasks.Mobilizon.Media.CleanOrphanTest do
size: 13_120
}
end

defp create_file do
File.cp!("test/fixtures/picture.png", "test/fixtures/picture_tmp.png")

file = %Plug.Upload{
content_type: "image/png",
path: Path.absname("test/fixtures/picture_tmp.png"),
filename: "image.png"
}

{:ok, data} = Mobilizon.Web.Upload.store(file)

%{
content_type: "image/png",
name: "image.png",
url: url
} = data

%Mobilizon.Medias.File{
name: "My Media",
url: url,
content_type: "image/png",
size: 13_120
}
end
end

Loading…
Cancel
Save