diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2018-12-05 13:37:06 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2018-12-05 13:37:06 +0300 |
commit | 848151f7cbf372d008c178d13c9a74942164c955 (patch) | |
tree | 1bc1cf906613de308d6c16dea7667908712dcdbc /test/upload_test.exs | |
parent | 53797d19c5e8463388862eaa20931c8cb78d66a6 (diff) | |
download | pleroma-848151f7cbf372d008c178d13c9a74942164c955.tar.gz pleroma-848151f7cbf372d008c178d13c9a74942164c955.zip |
[#210] [TwitterAPI] Made actor be stored for uploads. Added ownership check
to `update_media` action. Added controller tests for `upload` and `update_media` actions.
Refactoring.
Diffstat (limited to 'test/upload_test.exs')
-rw-r--r-- | test/upload_test.exs | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/test/upload_test.exs b/test/upload_test.exs index b2ce755d2..f2cad4cf0 100644 --- a/test/upload_test.exs +++ b/test/upload_test.exs @@ -3,22 +3,7 @@ defmodule Pleroma.UploadTest do use Pleroma.DataCase describe "Storing a file with the Local uploader" do - setup do - uploader = Pleroma.Config.get([Pleroma.Upload, :uploader]) - filters = Pleroma.Config.get([Pleroma.Upload, :filters]) - - unless uploader == Pleroma.Uploaders.Local || filters != [] do - Pleroma.Config.put([Pleroma.Upload, :uploader], Pleroma.Uploaders.Local) - Pleroma.Config.put([Pleroma.Upload, :filters], []) - - on_exit(fn -> - Pleroma.Config.put([Pleroma.Upload, :uploader], uploader) - Pleroma.Config.put([Pleroma.Upload, :filters], filters) - end) - end - - :ok - end + setup [:ensure_local_uploader] test "returns a media url" do File.cp!("test/fixtures/image.jpg", "test/fixtures/image_tmp.jpg") |