diff options
author | Maksim Pechnikov <parallel588@gmail.com> | 2019-12-08 21:25:26 +0300 |
---|---|---|
committer | Maksim Pechnikov <parallel588@gmail.com> | 2019-12-08 21:25:26 +0300 |
commit | 95e6a2acd9b18356e942172aa416d42031e8a17f (patch) | |
tree | d5093f04fc555435f022c9b3b1f7ce6e945f0199 /test/support/factory.ex | |
parent | 3fe7a1fd35a9ca81b158eff6dbcc25ca48cbf96d (diff) | |
parent | af5fef1f228a1781d7d9cad490d3b3a783389f5e (diff) | |
download | pleroma-95e6a2acd9b18356e942172aa416d42031e8a17f.tar.gz pleroma-95e6a2acd9b18356e942172aa416d42031e8a17f.zip |
Merge branch 'develop' into issue/1342
Diffstat (limited to 'test/support/factory.ex')
-rw-r--r-- | test/support/factory.ex | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/support/factory.ex b/test/support/factory.ex index 5f976f9ce..314f26ec9 100644 --- a/test/support/factory.ex +++ b/test/support/factory.ex @@ -43,6 +43,18 @@ defmodule Pleroma.Factory do } end + def user_relationship_factory(attrs \\ %{}) do + source = attrs[:source] || insert(:user) + target = attrs[:target] || insert(:user) + relationship_type = attrs[:relationship_type] || :block + + %Pleroma.UserRelationship{ + source_id: source.id, + target_id: target.id, + relationship_type: relationship_type + } + end + def note_factory(attrs \\ %{}) do text = sequence(:text, &"This is :moominmamma: note #{&1}") |