copy tmp file if test depends on it
authorAlexander Strizhakov <alex.strizhakov@gmail.com>
Tue, 21 Jul 2020 07:31:58 +0000 (10:31 +0300)
committerAlexander Strizhakov <alex.strizhakov@gmail.com>
Tue, 21 Jul 2020 07:31:58 +0000 (10:31 +0300)
test/upload/filter/anonymize_filename_test.exs
test/uploaders/local_test.exs

index 2d5c580f1ca4b909bd1c8aa814a1249e59a5a5b5..adff70f574272f2a6a682bf27898ada2950f85fb 100644 (file)
@@ -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",
index ae2cfef94261b0a20c68dc884bcc4990a0d3b264..18122ff6c372c98c74230dcfb9790d0178bfd92e 100644 (file)
@@ -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{