Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into remake-remodel-dms
[akkoma] / test / web / activity_pub / object_validators / types / recipients_test.exs
1 defmodule Pleroma.Web.ObjectValidators.Types.RecipientsTest do
2 alias Pleroma.Web.ActivityPub.ObjectValidators.Types.Recipients
3 use Pleroma.DataCase
4
5 test "it works with a list" do
6 list = ["https://lain.com/users/lain"]
7 assert {:ok, list} == Recipients.cast(list)
8 end
9
10 test "it turns a single string into a list" do
11 recipient = "https://lain.com/users/lain"
12
13 assert {:ok, [recipient]} == Recipients.cast(recipient)
14 end
15 end