X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fpleroma%2Fsignature_test.exs;h=59674bbc07bd46171a948385336551c742ab023e;hb=b71db2f82d91a6ae1406658374f15d948d8ad7e3;hp=047c537e0ed757d12e29213ab566f721d382d6ae;hpb=f917285b72dbc770be40478e1a55973f29d5db7d;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"}