Safety measures.
[akkoma] / test / upload_test.exs
1 defmodule Pleroma.UploadTest do
2 alias Pleroma.Upload
3 use Pleroma.DataCase
4
5 describe "Storing a file" do
6 test "copies the file to the configured folder" do
7 file = %Plug.Upload{content_type: "image/jpg", path: Path.absname("test/fixtures/image.jpg"), filename: "an_image.jpg"}
8 data = Upload.store(file)
9 assert data["name"] == "an_image.jpg"
10 end
11 end
12 end