From d6cc6aff9b617a50679fe99d1533d2b3d118b656 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Thu, 8 Aug 2024 14:22:25 -0400 Subject: [PATCH] Unintended commit --- test/support/factory.ex | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/test/support/factory.ex b/test/support/factory.ex index 64669fdf1..fb26f4162 100644 --- a/test/support/factory.ex +++ b/test/support/factory.ex @@ -53,15 +53,6 @@ defmodule Pleroma.Factory do keys: pem } - attrs = Map.delete(attrs, :domain) - - user - |> Map.put(:raw_bio, user.bio) - |> merge_attributes(attrs) - |> user_urls(attrs) - end - - defp user_urls(user, attrs) do urls = if attrs[:local] == false do base_domain = attrs[:domain] || Enum.random(["domain1.com", "domain2.com", "domain3.com"]) @@ -84,7 +75,12 @@ defmodule Pleroma.Factory do } end - Map.merge(user, urls) + attrs = Map.delete(attrs, :domain) + + user + |> Map.put(:raw_bio, user.bio) + |> Map.merge(urls) + |> merge_attributes(attrs) end def user_relationship_factory(attrs \\ %{}) do