Merge branch '1335-user-api-id-fields-relations' into 'develop'
[#1335] User: refactoring of AP ID fields into relations Closes #1335 See merge request pleroma/pleroma!1963
This commit is contained in:
commit
67d8df04a4
34 changed files with 765 additions and 265 deletions
|
|
@ -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}")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue