X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fpleroma%2Fmigration_helper%2Fnotification_backfill_test.exs;h=eca060800cabe6b11486975efde6314788403602;hb=0f132b802dde7f217ecb07767e0d34e3edb517b7;hp=2a62a2b00212ecf2f21799599b5b222c4d7ba0f7;hpb=409f694e4f90d34285b43c7e7afc594bc386d893;p=akkoma diff --git a/test/pleroma/migration_helper/notification_backfill_test.exs b/test/pleroma/migration_helper/notification_backfill_test.exs index 2a62a2b00..eca060800 100644 --- a/test/pleroma/migration_helper/notification_backfill_test.exs +++ b/test/pleroma/migration_helper/notification_backfill_test.exs @@ -1,9 +1,9 @@ # Pleroma: A lightweight social networking server -# Copyright © 2017-2020 Pleroma Authors +# Copyright © 2017-2021 Pleroma Authors # SPDX-License-Identifier: AGPL-3.0-only defmodule Pleroma.MigrationHelper.NotificationBackfillTest do - use Pleroma.DataCase + use Pleroma.DataCase, async: true alias Pleroma.Activity alias Pleroma.MigrationHelper.NotificationBackfill @@ -19,7 +19,6 @@ defmodule Pleroma.MigrationHelper.NotificationBackfillTest do other_user = insert(:user) {:ok, post} = CommonAPI.post(user, %{status: "yeah, @#{other_user.nickname}"}) - {:ok, chat} = CommonAPI.post_chat_message(user, other_user, "yo") {:ok, react} = CommonAPI.react_with_emoji(post.id, other_user, "☕") {:ok, like} = CommonAPI.favorite(other_user, post.id) {:ok, react_2} = CommonAPI.react_with_emoji(post.id, other_user, "☕") @@ -33,7 +32,7 @@ defmodule Pleroma.MigrationHelper.NotificationBackfillTest do |> Activity.change(%{data: data}) |> Repo.update() - assert {5, nil} = Repo.update_all(Notification, set: [type: nil]) + assert {4, nil} = Repo.update_all(Notification, set: [type: nil]) NotificationBackfill.fill_in_notification_types() @@ -48,9 +47,6 @@ defmodule Pleroma.MigrationHelper.NotificationBackfillTest do assert %{type: "pleroma:emoji_reaction"} = Repo.get_by(Notification, user_id: user.id, activity_id: react_2.id) - - assert %{type: "pleroma:chat_mention"} = - Repo.get_by(Notification, user_id: other_user.id, activity_id: chat.id) end end end