diff options
author | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2020-07-21 10:31:58 +0300 |
---|---|---|
committer | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2020-07-21 10:31:58 +0300 |
commit | 6afc6717d642060b086d01c2bfff5ead0aad1273 (patch) | |
tree | 2155d05bd31be34559eb348b7bdc90dae22590b7 | |
parent | af376cbffbae3ae594e594813873719dfd69664e (diff) | |
download | pleroma-6afc6717d642060b086d01c2bfff5ead0aad1273.tar.gz |
copy tmp file if test depends on it
-rw-r--r-- | test/upload/filter/anonymize_filename_test.exs | 2 | ||||
-rw-r--r-- | test/uploaders/local_test.exs | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/test/upload/filter/anonymize_filename_test.exs b/test/upload/filter/anonymize_filename_test.exs index 2d5c580f1..adff70f57 100644 --- a/test/upload/filter/anonymize_filename_test.exs +++ b/test/upload/filter/anonymize_filename_test.exs @@ -9,6 +9,8 @@ defmodule Pleroma.Upload.Filter.AnonymizeFilenameTest do alias Pleroma.Upload setup do + File.cp!("test/fixtures/image.jpg", "test/fixtures/image_tmp.jpg") + upload_file = %Upload{ name: "an… image.jpg", content_type: "image/jpg", diff --git a/test/uploaders/local_test.exs b/test/uploaders/local_test.exs index ae2cfef94..18122ff6c 100644 --- a/test/uploaders/local_test.exs +++ b/test/uploaders/local_test.exs @@ -14,6 +14,7 @@ defmodule Pleroma.Uploaders.LocalTest do describe "put_file/1" do test "put file to local folder" do + File.cp!("test/fixtures/image.jpg", "test/fixtures/image_tmp.jpg") file_path = "local_upload/files/image.jpg" file = %Pleroma.Upload{ @@ -32,6 +33,7 @@ defmodule Pleroma.Uploaders.LocalTest do describe "delete_file/1" do test "deletes local file" do + File.cp!("test/fixtures/image.jpg", "test/fixtures/image_tmp.jpg") file_path = "local_upload/files/image.jpg" file = %Pleroma.Upload{ |