diff options
author | kaniini <ariadne@dereferenced.org> | 2019-09-26 03:00:38 +0000 |
---|---|---|
committer | kaniini <ariadne@dereferenced.org> | 2019-09-26 03:00:38 +0000 |
commit | 48a82c46096a560fe9331a63f19ace6faaf98c3d (patch) | |
tree | 02c6216dbcb3814115aa64de0ef5a171121b527e /test/tasks | |
parent | 59ae9255fbf7abd6efe46799b19c094724f5d51b (diff) | |
parent | 035f22f7849815c5f77a734c56f409c0f08ac853 (diff) | |
download | pleroma-48a82c46096a560fe9331a63f19ace6faaf98c3d.tar.gz |
Merge branch 'refactor/user' into 'develop'
Simplify updating user's `info`
See merge request pleroma/pleroma!1712
Diffstat (limited to 'test/tasks')
-rw-r--r-- | test/tasks/database_test.exs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/test/tasks/database_test.exs b/test/tasks/database_test.exs index a9925c361..b63dcac00 100644 --- a/test/tasks/database_test.exs +++ b/test/tasks/database_test.exs @@ -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 |