X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=test%2Fuser_test.exs;h=60de0206e551552594cd59d05f827a9ebc072112;hb=32d4630c9ca1c89e655b37b3b939d728f569dc9f;hp=67266cb7a7ce7e27f659e7693ea4121f2986d673;hpb=45f790becc2cc63ac000c6432fe8c84e0b589822;p=akkoma
diff --git a/test/user_test.exs b/test/user_test.exs
index 67266cb7a..60de0206e 100644
--- a/test/user_test.exs
+++ b/test/user_test.exs
@@ -349,7 +349,7 @@ defmodule Pleroma.UserTest do
end
test "it creates confirmed user if :confirmed option is given" do
- changeset = User.register_changeset(%User{}, @full_user_data, confirmed: true)
+ changeset = User.register_changeset(%User{}, @full_user_data, need_confirmation: false)
assert changeset.valid?
{:ok, user} = Repo.insert(changeset)
@@ -829,10 +829,12 @@ defmodule Pleroma.UserTest do
user = insert(:user)
{:ok, activity} = CommonAPI.post(user, %{"status" => "2hu"})
- {:ok, _} = User.delete_user_activities(user)
- # TODO: Remove favorites, repeats, delete activities.
- refute Activity.get_by_id(activity.id)
+ Ecto.Adapters.SQL.Sandbox.unboxed_run(Repo, fn ->
+ {:ok, _} = User.delete_user_activities(user)
+ # TODO: Remove favorites, repeats, delete activities.
+ refute Activity.get_by_id(activity.id)
+ end)
end
test ".delete deactivates a user, all follow relationships and all create activities" do
@@ -1103,7 +1105,7 @@ defmodule Pleroma.UserTest do
expected_text =
"A.k.a. " <> "@nick@domain.com"
+ }'>@nick@domain.com"
assert expected_text == User.parse_bio(bio, user)
end