projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'fix/2047-rich-media-parser' into 'develop'
[akkoma]
/
test
/
web
/
web_finger
/
web_finger_test.exs
diff --git
a/test/web/web_finger/web_finger_test.exs
b/test/web/web_finger/web_finger_test.exs
index 4b4282727c347a0706544eaa0981e9047931e561..96fc0bbaa7b1419fe1230468d262c16df41cfca3 100644
(file)
--- a/
test/web/web_finger/web_finger_test.exs
+++ b/
test/web/web_finger/web_finger_test.exs
@@
-40,6
+40,11
@@
defmodule Pleroma.Web.WebFingerTest do
end
describe "fingering" do
end
describe "fingering" do
+ test "returns error for nonsensical input" do
+ assert {:error, _} = WebFinger.finger("bliblablu")
+ assert {:error, _} = WebFinger.finger("pleroma.social")
+ end
+
test "returns error when fails parse xml or json" do
user = "invalid_content@social.heldscal.la"
assert {:error, %Jason.DecodeError{}} = WebFinger.finger(user)
test "returns error when fails parse xml or json" do
user = "invalid_content@social.heldscal.la"
assert {:error, %Jason.DecodeError{}} = WebFinger.finger(user)
@@
-67,7
+72,7
@@
defmodule Pleroma.Web.WebFingerTest do
assert data["magic_key"] == nil
assert data["salmon"] == nil
assert data["magic_key"] == nil
assert data["salmon"] == nil
- assert data["topic"] ==
"https://mstdn.jp/users/kPherox.atom"
+ assert data["topic"] ==
nil
assert data["subject"] == "acct:kPherox@mstdn.jp"
assert data["ap_id"] == "https://mstdn.jp/users/kPherox"
assert data["subscribe_address"] == "https://mstdn.jp/authorize_interaction?acct={uri}"
assert data["subject"] == "acct:kPherox@mstdn.jp"
assert data["ap_id"] == "https://mstdn.jp/users/kPherox"
assert data["subscribe_address"] == "https://mstdn.jp/authorize_interaction?acct={uri}"