User: Truncate bios when updating a remote user.

This commit is contained in:
lain 2020-05-11 12:50:25 +02:00 committed by rinpatch
commit 3f13437a9c
4 changed files with 16 additions and 3 deletions

View file

@ -570,7 +570,10 @@ defmodule Pleroma.UserTest do
assert fetched_user == "not found nonexistant"
end
clear_config([:instance, :user_bio_length])
test "updates an existing user, if stale" do
Pleroma.Config.put([:instance, :user_bio_length], 1)
a_week_ago = NaiveDateTime.add(NaiveDateTime.utc_now(), -604_800)
orig_user =

View file

@ -310,7 +310,11 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do
end
describe "/inbox" do
clear_config([:instance, :user_bio_length])
test "it inserts an incoming activity into the database", %{conn: conn} do
Pleroma.Config.put([:instance, :user_bio_length], 1)
data = File.read!("test/fixtures/mastodon-post-activity.json") |> Poison.decode!()
conn =

View file

@ -5,8 +5,6 @@
defmodule Pleroma.Web.MastodonAPI.SuggestionControllerTest do
use Pleroma.Web.ConnCase
alias Pleroma.Config
setup do: oauth_access(["read"])
test "returns empty result", %{conn: conn} do