X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fpleroma%2Fsignature_test.exs;h=59674bbc07bd46171a948385336551c742ab023e;hb=07a48b9293e4046c50b5d424d60a1bf16c7cc198;hp=047c537e0ed757d12e29213ab566f721d382d6ae;hpb=2926713fe5c36b8fc64bcce13ca16bc12eaff96c;p=akkoma diff --git a/test/pleroma/signature_test.exs b/test/pleroma/signature_test.exs index 047c537e0..59674bbc0 100644 --- a/test/pleroma/signature_test.exs +++ b/test/pleroma/signature_test.exs @@ -109,9 +109,14 @@ defmodule Pleroma.SignatureTest do {:ok, "https://example.com/users/1234"} end + test "it deduces the actor id for gotoSocial" do + assert Signature.key_id_to_actor_id("https://example.com/users/1234/main-key") == + {:ok, "https://example.com/users/1234"} + end + test "it calls webfinger for 'acct:' accounts" do with_mock(Pleroma.Web.WebFinger, - finger: fn _ -> %{"ap_id" => "https://gensokyo.2hu/users/raymoo"} end + finger: fn _ -> {:ok, %{"ap_id" => "https://gensokyo.2hu/users/raymoo"}} end ) do assert Signature.key_id_to_actor_id("acct:raymoo@gensokyo.2hu") == {:ok, "https://gensokyo.2hu/users/raymoo"}