Merge branch 'fix/activity-expirations-again' of git.pleroma.social:pleroma/pleroma into fix/activity-expirations-again
This commit is contained in:
commit
677abbf0ee
25 changed files with 51 additions and 151 deletions
|
|
@ -1,30 +0,0 @@
|
|||
# Pleroma: A lightweight social networking server
|
||||
# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
|
||||
# SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
defmodule Mix.Tasks.Pleroma.ReleaseEnvTest do
|
||||
use ExUnit.Case
|
||||
import ExUnit.CaptureIO, only: [capture_io: 1]
|
||||
|
||||
@path "config/pleroma.test.env"
|
||||
|
||||
def do_clean do
|
||||
if File.exists?(@path) do
|
||||
File.rm_rf(@path)
|
||||
end
|
||||
end
|
||||
|
||||
setup do
|
||||
do_clean()
|
||||
on_exit(fn -> do_clean() end)
|
||||
:ok
|
||||
end
|
||||
|
||||
test "generate pleroma.env" do
|
||||
assert capture_io(fn ->
|
||||
Mix.Tasks.Pleroma.ReleaseEnv.run(["gen", "--path", @path, "--force"])
|
||||
end) =~ "The file generated"
|
||||
|
||||
assert File.read!(@path) =~ "RELEASE_COOKIE="
|
||||
end
|
||||
end
|
||||
|
|
@ -214,6 +214,10 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController.UpdateCredentialsTest do
|
|||
|
||||
assert user_data = json_response_and_validate_schema(conn, 200)
|
||||
assert user_data["display_name"] == "markorepairs"
|
||||
|
||||
update_activity = Repo.one(Pleroma.Activity)
|
||||
assert update_activity.data["type"] == "Update"
|
||||
assert update_activity.data["object"]["name"] == "markorepairs"
|
||||
end
|
||||
|
||||
test "updates the user's avatar", %{user: user, conn: conn} do
|
||||
|
|
|
|||
|
|
@ -9,13 +9,12 @@ defmodule Pleroma.Web.Metadata.Providers.RelMeTest do
|
|||
|
||||
test "it renders all links with rel='me' from user bio" do
|
||||
bio =
|
||||
~s(<a href="https://some-link.com">https://some-link.com</a> <a rel="me" href="https://another-link.com">https://another-link.com</a>
|
||||
<link href="http://some.com"> <link rel="me" href="http://some3.com>")
|
||||
~s(<a href="https://some-link.com">https://some-link.com</a> <a rel="me" href="https://another-link.com">https://another-link.com</a> <link href="http://some.com"> <link rel="me" href="http://some3.com">)
|
||||
|
||||
user = insert(:user, %{bio: bio})
|
||||
|
||||
assert RelMe.build_tags(%{user: user}) == [
|
||||
{:link, [rel: "me", href: "http://some3.com>"], []},
|
||||
{:link, [rel: "me", href: "http://some3.com"], []},
|
||||
{:link, [rel: "me", href: "https://another-link.com"], []}
|
||||
]
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue