diff options
author | href <href@random.sh> | 2020-06-16 15:11:45 +0200 |
---|---|---|
committer | href <href@random.sh> | 2020-06-16 15:27:27 +0200 |
commit | f124f6820582d50be83ba7a1709b14ce8ee1abcc (patch) | |
tree | b263c9f9c957e4502695a648dd4b2bd5dd951fea /test/web | |
parent | ec1452fd1cdb9cb1db9b8bad872916d3213489e2 (diff) | |
download | pleroma-f124f6820582d50be83ba7a1709b14ce8ee1abcc.tar.gz pleroma-f124f6820582d50be83ba7a1709b14ce8ee1abcc.zip |
Switch from gen_magic to majic, use Majic.Plug, remove Pleroma.MIME
Diffstat (limited to 'test/web')
-rw-r--r-- | test/web/activity_pub/activity_pub_controller_test.exs | 5 | ||||
-rw-r--r-- | test/web/activity_pub/object_validator_test.exs | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/test/web/activity_pub/activity_pub_controller_test.exs b/test/web/activity_pub/activity_pub_controller_test.exs index e490a5744..8c6ee68b2 100644 --- a/test/web/activity_pub/activity_pub_controller_test.exs +++ b/test/web/activity_pub/activity_pub_controller_test.exs @@ -1428,9 +1428,9 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do desc = "Description of the image" image = %Plug.Upload{ - content_type: "image/jpg", + content_type: "bad/content-type", path: Path.absname("test/fixtures/image.jpg"), - filename: "an_image.jpg" + filename: "an_image.png" } object = @@ -1445,6 +1445,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do assert [%{"href" => object_href, "mediaType" => object_mediatype}] = object["url"] assert is_binary(object_href) assert object_mediatype == "image/jpeg" + assert String.ends_with?(object_href, ".jpg") activity_request = %{ "@context" => "https://www.w3.org/ns/activitystreams", diff --git a/test/web/activity_pub/object_validator_test.exs b/test/web/activity_pub/object_validator_test.exs index 31224abe0..ee1e1bcfe 100644 --- a/test/web/activity_pub/object_validator_test.exs +++ b/test/web/activity_pub/object_validator_test.exs @@ -58,7 +58,7 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidatorTest do user = insert(:user) file = %Plug.Upload{ - content_type: "image/jpg", + content_type: "image/jpeg", path: Path.absname("test/fixtures/image.jpg"), filename: "an_image.jpg" } |