projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix typo: s/"tags"/"tag"/g
[akkoma]
/
test
/
support
/
factory.ex
diff --git
a/test/support/factory.ex
b/test/support/factory.ex
index 2a2954ad615ea0993b1479f3f81b6c697bfdc267..90c7d80f2d607111a50fe441bfcbc31f40ed744f 100644
(file)
--- a/
test/support/factory.ex
+++ b/
test/support/factory.ex
@@
-43,7
+43,7
@@
defmodule Pleroma.Factory do
def note_factory(attrs \\ %{}) do
text = sequence(:text, &"This is :moominmamma: note #{&1}")
def note_factory(attrs \\ %{}) do
text = sequence(:text, &"This is :moominmamma: note #{&1}")
- user = insert(:user)
+ user =
attrs[:user] ||
insert(:user)
data = %{
"type" => "Note",
data = %{
"type" => "Note",
@@
-113,7
+113,8
@@
defmodule Pleroma.Factory do
end
def note_activity_factory(attrs \\ %{}) do
end
def note_activity_factory(attrs \\ %{}) do
- note = attrs[:note] || insert(:note)
+ user = attrs[:user] || insert(:user)
+ note = attrs[:note] || insert(:note, user: user)
data = %{
"id" => Pleroma.Web.ActivityPub.Utils.generate_activity_id(),
data = %{
"id" => Pleroma.Web.ActivityPub.Utils.generate_activity_id(),