diff options
| author | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2021-03-21 13:41:20 +0300 | 
|---|---|---|
| committer | Mark Felder <feld@feld.me> | 2022-11-03 10:06:36 -0400 | 
| commit | 8407e26b0c1ec315fe8864948c78657f29f370c7 (patch) | |
| tree | 8cb3efaeb2cbfebcddc79bcc2cdef2c480ad6453 | |
| parent | a57c0255940ff0c974e3d5dab2d09717a5690751 (diff) | |
| download | pleroma-8407e26b0c1ec315fe8864948c78657f29f370c7.tar.gz pleroma-8407e26b0c1ec315fe8864948c78657f29f370c7.zip  | |
rebase fix
| -rw-r--r-- | lib/pleroma/web/web_finger.ex | 2 | ||||
| -rw-r--r-- | test/pleroma/user_test.exs | 16 | ||||
| -rw-r--r-- | test/pleroma/web/web_finger_test.exs | 6 | 
3 files changed, 17 insertions, 7 deletions
diff --git a/lib/pleroma/web/web_finger.ex b/lib/pleroma/web/web_finger.ex index 967935e5e..f95dc2458 100644 --- a/lib/pleroma/web/web_finger.ex +++ b/lib/pleroma/web/web_finger.ex @@ -69,8 +69,6 @@ defmodule Pleroma.Web.WebFinger do    end    def represent_user(user, "JSON") do -    {:ok, user} = User.ensure_keys_present(user) -      %{        "subject" => "acct:#{user.nickname}@#{domain()}",        "aliases" => gather_aliases(user), diff --git a/test/pleroma/user_test.exs b/test/pleroma/user_test.exs index 958018b82..303598fad 100644 --- a/test/pleroma/user_test.exs +++ b/test/pleroma/user_test.exs @@ -887,7 +887,8 @@ defmodule Pleroma.UserTest do                |> File.read!()                |> String.replace("{{nickname}}", "a")                |> String.replace("{{domain}}", "example.com") -              |> String.replace("{{subdomain}}", "sub.example.com") +              |> String.replace("{{subdomain}}", "sub.example.com"), +            headers: [{"content-type", "application/jrd+json"}]            }          %{url: "https://sub.example.com/users/a"} -> @@ -900,6 +901,16 @@ defmodule Pleroma.UserTest do                |> String.replace("{{domain}}", "sub.example.com"),              headers: [{"content-type", "application/activity+json"}]            } + +        %{url: "https://sub.example.com/users/a/collections/featured"} -> +          %Tesla.Env{ +            status: 200, +            body: +              File.read!("test/fixtures/users_mock/masto_featured.json") +              |> String.replace("{{domain}}", "sub.example.com") +              |> String.replace("{{nickname}}", "a"), +            headers: [{"content-type", "application/activity+json"}] +          }        end)        ap_id = "a@example.com" @@ -934,7 +945,8 @@ defmodule Pleroma.UserTest do                |> File.read!()                |> String.replace("{{nickname}}", "a")                |> String.replace("{{domain}}", "example.com") -              |> String.replace("{{subdomain}}", "sub.example.com") +              |> String.replace("{{subdomain}}", "sub.example.com"), +            headers: [{"content-type", "application/jrd+json"}]            }          %{url: "https://sub.example.com/users/a"} -> diff --git a/test/pleroma/web/web_finger_test.exs b/test/pleroma/web/web_finger_test.exs index 90aa4f173..fafef54fe 100644 --- a/test/pleroma/web/web_finger_test.exs +++ b/test/pleroma/web/web_finger_test.exs @@ -47,7 +47,7 @@ defmodule Pleroma.Web.WebFingerTest do      test "returns error when there is no content-type header" do        Tesla.Mock.mock(fn -        %{url: "http://social.heldscal.la/.well-known/host-meta"} -> +        %{url: "https://social.heldscal.la/.well-known/host-meta"} ->            {:ok,             %Tesla.Env{               status: 200, @@ -147,7 +147,7 @@ defmodule Pleroma.Web.WebFingerTest do               headers: [{"content-type", "application/jrd+json"}]             }} -        %{url: "http://mastodon.social/.well-known/host-meta"} -> +        %{url: "https://mastodon.social/.well-known/host-meta"} ->            {:ok,             %Tesla.Env{               status: 200, @@ -170,7 +170,7 @@ defmodule Pleroma.Web.WebFingerTest do               headers: [{"content-type", "application/xrd+xml"}]             }} -        %{url: "http://pawoo.net/.well-known/host-meta"} -> +        %{url: "https://pawoo.net/.well-known/host-meta"} ->            {:ok,             %Tesla.Env{               status: 200,  | 
