diff options
author | kaniini <nenolod@gmail.com> | 2019-03-04 18:29:13 +0000 |
---|---|---|
committer | kaniini <nenolod@gmail.com> | 2019-03-04 18:29:13 +0000 |
commit | d45dbdce5a478a004711baad963d7134988402ed (patch) | |
tree | 6dfcc121950f9513ae82bfc147c6dbc1b3b069a6 /test/support | |
parent | ca5d894e6811e0020facabdaa12d2fd263b497c5 (diff) | |
parent | 0245ce842fad4dd53f3c6f6e4a146fc857e8eb1d (diff) | |
download | pleroma-d45dbdce5a478a004711baad963d7134988402ed.tar.gz |
Merge branch 'feature/add-status-text-to-notifications' into 'develop'
Add status text to notifications (mentions and reposts)
Closes #696
See merge request pleroma/pleroma!897
Diffstat (limited to 'test/support')
-rw-r--r-- | test/support/factory.ex | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/support/factory.ex b/test/support/factory.ex index d1956d1cd..c025aaf21 100644 --- a/test/support/factory.ex +++ b/test/support/factory.ex @@ -23,7 +23,7 @@ defmodule Pleroma.Factory do } end - def note_factory do + def note_factory(attrs \\ %{}) do text = sequence(:text, &"This is :moominmamma: note #{&1}") user = insert(:user) @@ -46,7 +46,7 @@ defmodule Pleroma.Factory do } %Pleroma.Object{ - data: data + data: merge_attributes(data, Map.get(attrs, :data, %{})) } end @@ -95,8 +95,8 @@ defmodule Pleroma.Factory do } end - def note_activity_factory do - note = insert(:note) + def note_activity_factory(attrs \\ %{}) do + note = attrs[:note] || insert(:note) data = %{ "id" => Pleroma.Web.ActivityPub.Utils.generate_activity_id(), @@ -135,9 +135,9 @@ defmodule Pleroma.Factory do } end - def announce_activity_factory do - note_activity = insert(:note_activity) - user = insert(:user) + def announce_activity_factory(attrs \\ %{}) do + note_activity = attrs[:note_activity] || insert(:note_activity) + user = attrs[:user] || insert(:user) data = %{ "type" => "Announce", |