Preloaders: Use strings as keys.
This commit is contained in:
parent
a19f8778af
commit
8630a6c7f5
8 changed files with 13 additions and 13 deletions
|
|
@ -8,7 +8,7 @@ defmodule Pleroma.Web.Preload.Providers.InstanceTest do
|
|||
|
||||
setup do: {:ok, Instance.generate_terms(nil)}
|
||||
|
||||
test "it renders the info", %{"/api/v1/instance": info} do
|
||||
test "it renders the info", %{"/api/v1/instance" => info} do
|
||||
assert %{
|
||||
description: description,
|
||||
email: "admin@example.com",
|
||||
|
|
@ -18,14 +18,14 @@ defmodule Pleroma.Web.Preload.Providers.InstanceTest do
|
|||
assert String.equivalent?(description, "Pleroma: An efficient and flexible fediverse server")
|
||||
end
|
||||
|
||||
test "it renders the panel", %{"/instance/panel.html": panel} do
|
||||
test "it renders the panel", %{"/instance/panel.html" => panel} do
|
||||
assert String.contains?(
|
||||
panel,
|
||||
"<p>Welcome to <a href=\"https://pleroma.social\" target=\"_blank\">Pleroma!</a></p>"
|
||||
)
|
||||
end
|
||||
|
||||
test "it renders the node_info", %{"/nodeinfo/2.0.json": nodeinfo} do
|
||||
test "it renders the node_info", %{"/nodeinfo/2.0.json" => nodeinfo} do
|
||||
%{
|
||||
metadata: metadata,
|
||||
version: "2.0"
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ defmodule Pleroma.Web.Preload.Providers.StatusNetTest do
|
|||
|
||||
setup do: {:ok, StatusNet.generate_terms(nil)}
|
||||
|
||||
test "it renders the info", %{"/api/statusnet/config.json": info} do
|
||||
test "it renders the info", %{"/api/statusnet/config.json" => info} do
|
||||
assert {:ok, res} = Jason.decode(info)
|
||||
assert res["site"]
|
||||
end
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ defmodule Pleroma.Web.Preload.Providers.TimelineTest do
|
|||
alias Pleroma.Web.CommonAPI
|
||||
alias Pleroma.Web.Preload.Providers.Timelines
|
||||
|
||||
@public_url :"/api/v1/timelines/public"
|
||||
@public_url "/api/v1/timelines/public"
|
||||
|
||||
describe "unauthenticated timeliness when restricted" do
|
||||
setup do
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ defmodule Pleroma.Web.Preload.Providers.UserTest do
|
|||
end
|
||||
|
||||
test "account is rendered", %{terms: terms, user: user} do
|
||||
account = terms[:"/api/v1/accounts/#{user.id}"]
|
||||
account = terms["/api/v1/accounts/#{user.id}"]
|
||||
assert %{acct: user, username: user} = account
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue