factory: Fix article_factory
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Mon, 31 May 2021 08:06:06 +0000 (10:06 +0200)
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Thu, 3 Jun 2021 17:11:16 +0000 (19:11 +0200)
test/support/factory.ex

index 5c4e65c81b46e549663b14e9ba6f24b3e309a4e8..c267dba4ef41140f404ae2902662197c086b37aa 100644 (file)
@@ -191,8 +191,8 @@ defmodule Pleroma.Factory do
   end
 
   def article_factory do
-    note_factory()
-    |> Map.put("type", "Article")
+    %Pleroma.Object{data: data} = note_factory()
+    %Pleroma.Object{data: Map.merge(data, %{"type" => "Article"})}
   end
 
   def tombstone_factory do