diff options
author | rinpatch <rinpatch@sdf.org> | 2019-12-06 00:12:21 +0300 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2019-12-06 00:12:21 +0300 |
commit | cdff5b82670313e46c2b362d4cf041779af6a6bd (patch) | |
tree | edc39a1b48f48334480e709fbda844cb120b32f8 /test/support/factory.ex | |
parent | 9f99640cfc81f28c0b6cdb5f6ef065b3e46f5f23 (diff) | |
parent | 67d8df04a440ec9b2949bdddd3a3d8dd70c9b140 (diff) | |
download | pleroma-cdff5b82670313e46c2b362d4cf041779af6a6bd.tar.gz pleroma-cdff5b82670313e46c2b362d4cf041779af6a6bd.zip |
Merge branch 'develop' into fix/mrf-delete
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 bb8a64e72..35ba523a1 100644 --- a/test/support/factory.ex +++ b/test/support/factory.ex @@ -42,6 +42,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}") |