Merge pull request 'lint-warnings' (#7867) from phnt/pleroma:lint-warnings into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/7867
This commit is contained in:
commit
f138423814
7 changed files with 28 additions and 9 deletions
0
changelog.d/lint-warnings.skip
Normal file
0
changelog.d/lint-warnings.skip
Normal file
|
|
@ -172,7 +172,10 @@ defmodule Pleroma.Web.ApiSpec.ListOperation do
|
|||
type: :object,
|
||||
properties: %{
|
||||
title: %Schema{type: :string, description: "List title"},
|
||||
exclusive: %Schema{type: :boolean, description: "Whether members of the list should be removed from the “Home” feed"}
|
||||
exclusive: %Schema{
|
||||
type: :boolean,
|
||||
description: "Whether members of the list should be removed from the “Home” feed"
|
||||
}
|
||||
},
|
||||
required: [:title]
|
||||
},
|
||||
|
|
@ -188,7 +191,10 @@ defmodule Pleroma.Web.ApiSpec.ListOperation do
|
|||
type: :object,
|
||||
properties: %{
|
||||
title: %Schema{type: :string, description: "List title"},
|
||||
exclusive: %Schema{type: :boolean, description: "Whether members of the list should be removed from the “Home” feed"}
|
||||
exclusive: %Schema{
|
||||
type: :boolean,
|
||||
description: "Whether members of the list should be removed from the “Home” feed"
|
||||
}
|
||||
}
|
||||
},
|
||||
required: true
|
||||
|
|
|
|||
|
|
@ -48,7 +48,8 @@ defmodule Pleroma.Web.Endpoint do
|
|||
|
||||
@static_cache_control "public, max-age=1209600, immutable"
|
||||
@static_cache_disabled "public, no-cache"
|
||||
@favicon_cache_control "public, max=age=86400, immutable" # cache for a day
|
||||
# cache for a day
|
||||
@favicon_cache_control "public, max=age=86400, immutable"
|
||||
|
||||
# InstanceStatic needs to be before Plug.Static to be able to override shipped-static files
|
||||
# If you're adding new paths to `only:` you'll need to configure them in InstanceStatic as well
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ defmodule Pleroma.Web.ActivityPub.MRFTest do
|
|||
|
||||
alias Pleroma.Web.ActivityPub.MRF
|
||||
|
||||
defp regexes_match!([],[]), do: true
|
||||
defp regexes_match!([], []), do: true
|
||||
|
||||
defp regexes_match!([authority | authority_rest], [checked | checked_rest]) do
|
||||
authority.source == checked.source and regexes_match!(authority_rest, checked_rest)
|
||||
|
|
|
|||
|
|
@ -1815,7 +1815,10 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
|
|||
test "returns lists to which the account belongs" do
|
||||
%{user: user, conn: conn} = oauth_access(["read:lists"])
|
||||
other_user = insert(:user)
|
||||
assert {:ok, %Pleroma.List{id: _list_id} = list} = Pleroma.List.create(%{title: "Test List"}, user)
|
||||
|
||||
assert {:ok, %Pleroma.List{id: _list_id} = list} =
|
||||
Pleroma.List.create(%{title: "Test List"}, user)
|
||||
|
||||
{:ok, %{following: _following}} = Pleroma.List.follow(list, other_user)
|
||||
|
||||
assert [%{"id" => _list_id, "title" => "Test List"}] =
|
||||
|
|
|
|||
|
|
@ -105,6 +105,7 @@ defmodule Pleroma.Web.Plugs.FrontendStaticPlugTest do
|
|||
"nodeinfo",
|
||||
"manifest.json",
|
||||
"auth",
|
||||
"embed",
|
||||
"proxy",
|
||||
"test",
|
||||
"user_exists",
|
||||
|
|
|
|||
|
|
@ -83,7 +83,9 @@ defmodule Pleroma.Web.RemoteInteraction.RemoteInteractionControllerTest do
|
|||
|
||||
response =
|
||||
conn
|
||||
|> get(remote_interaction_path(conn, :follow, %{acct: "https://mastodon.social/users/emelie"}))
|
||||
|> get(
|
||||
remote_interaction_path(conn, :follow, %{acct: "https://mastodon.social/users/emelie"})
|
||||
)
|
||||
|> html_response(200)
|
||||
|
||||
assert response =~ "Log in to follow"
|
||||
|
|
@ -114,7 +116,9 @@ defmodule Pleroma.Web.RemoteInteraction.RemoteInteractionControllerTest do
|
|||
response =
|
||||
conn
|
||||
|> assign(:user, user)
|
||||
|> get(remote_interaction_path(conn, :follow, %{acct: "https://mastodon.social/users/emelie"}))
|
||||
|> get(
|
||||
remote_interaction_path(conn, :follow, %{acct: "https://mastodon.social/users/emelie"})
|
||||
)
|
||||
|> html_response(200)
|
||||
|
||||
assert response =~ "Remote follow"
|
||||
|
|
@ -157,7 +161,9 @@ defmodule Pleroma.Web.RemoteInteraction.RemoteInteractionControllerTest do
|
|||
conn
|
||||
|> assign(:user, user)
|
||||
|> assign(:token, read_token)
|
||||
|> post(remote_interaction_path(conn, :do_follow), %{"user" => %{"id" => user2.id}})
|
||||
|> post(remote_interaction_path(conn, :do_follow), %{
|
||||
"user" => %{"id" => user2.id}
|
||||
})
|
||||
|> response(200)
|
||||
|
||||
assert response =~ "Error following account"
|
||||
|
|
@ -496,7 +502,9 @@ defmodule Pleroma.Web.RemoteInteraction.RemoteInteractionControllerTest do
|
|||
)
|
||||
|
||||
assert redirected_to(conn) ==
|
||||
remote_interaction_path(conn, :follow, %{acct: "https://mastodon.social/users/emelie"})
|
||||
remote_interaction_path(conn, :follow, %{
|
||||
acct: "https://mastodon.social/users/emelie"
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue