mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-10 19:29:11 +00:00
Preloaders: Remove status_net preloader
This commit is contained in:
parent
f787eb1acf
commit
28feba8af4
2 changed files with 0 additions and 40 deletions
|
@ -1,25 +0,0 @@
|
|||
# Pleroma: A lightweight social networking server
|
||||
# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
|
||||
# SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
defmodule Pleroma.Web.Preload.Providers.StatusNet do
|
||||
alias Pleroma.Web.Preload.Providers.Provider
|
||||
alias Pleroma.Web.TwitterAPI.UtilController
|
||||
|
||||
@behaviour Provider
|
||||
@config_url "/api/statusnet/config.json"
|
||||
|
||||
@impl Provider
|
||||
def generate_terms(_params) do
|
||||
%{}
|
||||
|> build_config_tag()
|
||||
end
|
||||
|
||||
defp build_config_tag(acc) do
|
||||
resp =
|
||||
Plug.Test.conn(:get, @config_url |> to_string())
|
||||
|> UtilController.config(nil)
|
||||
|
||||
Map.put(acc, @config_url, resp.resp_body)
|
||||
end
|
||||
end
|
|
@ -1,15 +0,0 @@
|
|||
# Pleroma: A lightweight social networking server
|
||||
# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
|
||||
# SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
defmodule Pleroma.Web.Preload.Providers.StatusNetTest do
|
||||
use Pleroma.DataCase
|
||||
alias Pleroma.Web.Preload.Providers.StatusNet
|
||||
|
||||
setup do: {:ok, StatusNet.generate_terms(nil)}
|
||||
|
||||
test "it renders the info", %{"/api/statusnet/config.json" => info} do
|
||||
assert {:ok, res} = Jason.decode(info)
|
||||
assert res["site"]
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue