alias Pleroma.Web.MastodonAPI.InstanceView
alias Pleroma.Web.Nodeinfo.Nodeinfo
alias Pleroma.Web.Preload.Providers.Provider
+ alias Pleroma.Plugs.InstanceStatic
@behaviour Provider
- @instance_url :"/api/v1/instance"
- @panel_url :"/instance/panel.html"
- @nodeinfo_url :"/nodeinfo/2.0"
+ @instance_url "/api/v1/instance"
+ @panel_url "/instance/panel.html"
+ @nodeinfo_url "/nodeinfo/2.0.json"
@impl Provider
def generate_terms(_params) do
)
end
- %{"/instance/panel.html": panel} = Instance.generate_terms(nil)
+ test "it works with overrides" do
+ clear_config([:instance, :static_dir], "test/fixtures/preload_static")
+
- test "it renders the node_info", %{"/nodeinfo/2.0": nodeinfo} do
++ %{"/instance/panel.html" => panel} = Instance.generate_terms(nil)
+
+ assert String.contains?(
+ panel,
+ "HEY!"
+ )
+ end
+
+ test "it renders the node_info", %{"/nodeinfo/2.0.json" => nodeinfo} do
%{
metadata: metadata,
version: "2.0"