summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2022-12-16 00:36:59 +0000
committerlain <lain@soykaf.club>2022-12-16 00:36:59 +0000
commit301eb86b35957cbb91849959cf596e4b480077e0 (patch)
tree33a6218a2e5a9856cd9da31f6a85d8304b2c6d0f /test
parentc0cfc454ba7ecaa5cc729c7916b72226df2e87ff (diff)
parentbb27e4134b67e406810e40bbefd99fe392c25fed (diff)
Merge branch 'update-deps' into 'develop'
Update to Phoenix 1.6, Elixir 1.11, and chase dependencies See merge request pleroma/pleroma!3766
Diffstat (limited to 'test')
-rw-r--r--test/pleroma/object/fetcher_test.exs2
-rw-r--r--test/pleroma/web/activity_pub/object_validators/attachment_validator_test.exs13
2 files changed, 14 insertions, 1 deletions
diff --git a/test/pleroma/object/fetcher_test.exs b/test/pleroma/object/fetcher_test.exs
index 51541a42c..c8ad66ddb 100644
--- a/test/pleroma/object/fetcher_test.exs
+++ b/test/pleroma/object/fetcher_test.exs
@@ -166,7 +166,7 @@ defmodule Pleroma.Object.FetcherTest do
Instances.set_consistently_unreachable(id)
refute Instances.reachable?(id)
- {:ok, object} =
+ {:ok, _object} =
Fetcher.fetch_object_from_id("http://mastodon.example.org/@admin/99541947525187367")
assert Instances.reachable?(id)
diff --git a/test/pleroma/web/activity_pub/object_validators/attachment_validator_test.exs b/test/pleroma/web/activity_pub/object_validators/attachment_validator_test.exs
index 9a17e277e..77f2044e9 100644
--- a/test/pleroma/web/activity_pub/object_validators/attachment_validator_test.exs
+++ b/test/pleroma/web/activity_pub/object_validators/attachment_validator_test.exs
@@ -11,6 +11,19 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.AttachmentValidatorTest do
import Pleroma.Factory
describe "attachments" do
+ test "fails without url" do
+ attachment = %{
+ "mediaType" => "",
+ "name" => "",
+ "summary" => "298p3RG7j27tfsZ9RQ.jpg",
+ "type" => "Document"
+ }
+
+ assert {:error, _cng} =
+ AttachmentValidator.cast_and_validate(attachment)
+ |> Ecto.Changeset.apply_action(:insert)
+ end
+
test "works with honkerific attachments" do
attachment = %{
"mediaType" => "",