projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
argon2 password hashing (#406)
[akkoma]
/
test
/
pleroma
/
signature_test.exs
diff --git
a/test/pleroma/signature_test.exs
b/test/pleroma/signature_test.exs
index a7a75aa4dcc3aac46b3faf4ee9aa1afce4c84ef9..59674bbc07bd46171a948385336551c742ab023e 100644
(file)
--- a/
test/pleroma/signature_test.exs
+++ b/
test/pleroma/signature_test.exs
@@
-1,5
+1,5
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-202
0
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-202
1
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.SignatureTest do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.SignatureTest do
@@
-109,9
+109,14
@@
defmodule Pleroma.SignatureTest do
{:ok, "https://example.com/users/1234"}
end
{: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,
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"}
) do
assert Signature.key_id_to_actor_id("acct:raymoo@gensokyo.2hu") ==
{:ok, "https://gensokyo.2hu/users/raymoo"}