projects
/
akkoma
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Correct active state websub name.
[akkoma]
/
test
/
support
/
builders
/
user_builder.ex
1
defmodule Pleroma.Builders.UserBuilder do
2
alias Pleroma.{User, Repo}
3
4
def build(data \\ %{}) do
5
user = %User{
6
email: "test@example.org",
7
name: "Test Name",
8
nickname: "testname",
9
password_hash: Comeonin.Pbkdf2.hashpwsalt("test"),
10
bio: "A tester.",
11
ap_id: "some id"
12
}
13
Map.merge(user, data)
14
end
15
16
def insert(data \\ %{}) do
17
Repo.insert(build(data))
18
end
19
end