Browse Source

copy tmp file if test depends on it

chores/our-libs-hex-releases
Alexander Strizhakov 4 years ago
parent
commit
6afc6717d6
No known key found for this signature in database GPG Key ID: 22896A53AEF1381
2 changed files with 4 additions and 0 deletions
  1. +2
    -0
      test/upload/filter/anonymize_filename_test.exs
  2. +2
    -0
      test/uploaders/local_test.exs

+ 2
- 0
test/upload/filter/anonymize_filename_test.exs View 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",


+ 2
- 0
test/uploaders/local_test.exs View 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{


Loading…
Cancel
Save