+ test "returns error when fails parse xml or json" do
+ user = "invalid_content@social.heldscal.la"
+ assert {:error, %Jason.DecodeError{}} = WebFinger.finger(user)
+ end
+
+ test "returns the ActivityPub actor URI for an ActivityPub user" do
+ user = "framasoft@framatube.org"
+
+ {:ok, _data} = WebFinger.finger(user)
+ end
+
+ test "returns the ActivityPub actor URI for an ActivityPub user with the ld+json mimetype" do
+ user = "kaniini@gerzilla.de"
+
+ {:ok, data} = WebFinger.finger(user)
+
+ assert data["ap_id"] == "https://gerzilla.de/channel/kaniini"
+ end
+
+ test "it work for AP-only user" do
+ user = "kpherox@mstdn.jp"