Add User.change_info/2 and User.update_info/2
This commit is contained in:
parent
79b25be4e1
commit
209395c7e6
12 changed files with 146 additions and 307 deletions
|
|
@ -77,12 +77,10 @@ defmodule Mix.Tasks.Pleroma.DatabaseTest do
|
|||
assert length(following) == 2
|
||||
assert info.follower_count == 0
|
||||
|
||||
info_cng = Ecto.Changeset.change(info, %{follower_count: 3})
|
||||
|
||||
{:ok, user} =
|
||||
user
|
||||
|> Ecto.Changeset.change(%{following: following ++ following})
|
||||
|> Ecto.Changeset.put_embed(:info, info_cng)
|
||||
|> User.change_info(&Ecto.Changeset.change(&1, %{follower_count: 3}))
|
||||
|> Repo.update()
|
||||
|
||||
assert length(user.following) == 4
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue