tests: chase remote/local removal
authorWilliam Pitcock <nenolod@dereferenced.org>
Sun, 26 May 2019 00:20:54 +0000 (00:20 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Sun, 26 May 2019 00:20:54 +0000 (00:20 +0000)
test/notification_test.exs
test/web/mastodon_api/account_view_test.exs
test/web/twitter_api/util_controller_test.exs

index b54414dcd1085ad390c01278ffe75ef6239aeb71..be292abd9ffce0e6cef082965aa1e1fce4dd2733 100644 (file)
@@ -78,33 +78,6 @@ defmodule Pleroma.NotificationTest do
       assert nil == Notification.create_notification(activity, muter)
     end
 
-    test "it disables notifications from people on remote instances" do
-      user = insert(:user, info: %{notification_settings: %{"remote" => false}})
-      other_user = insert(:user)
-
-      create_activity = %{
-        "@context" => "https://www.w3.org/ns/activitystreams",
-        "type" => "Create",
-        "to" => ["https://www.w3.org/ns/activitystreams#Public"],
-        "actor" => other_user.ap_id,
-        "object" => %{
-          "type" => "Note",
-          "content" => "Hi @#{user.nickname}",
-          "attributedTo" => other_user.ap_id
-        }
-      }
-
-      {:ok, %{local: false} = activity} = Transmogrifier.handle_incoming(create_activity)
-      assert nil == Notification.create_notification(activity, user)
-    end
-
-    test "it disables notifications from people on the local instance" do
-      user = insert(:user, info: %{notification_settings: %{"local" => false}})
-      other_user = insert(:user)
-      {:ok, activity} = CommonAPI.post(other_user, %{"status" => "hey @#{user.nickname}"})
-      assert nil == Notification.create_notification(activity, user)
-    end
-
     test "it disables notifications from followers" do
       follower = insert(:user)
       followed = insert(:user, info: %{notification_settings: %{"followers" => false}})
index 6f8480ee2badb460a43614e1cc6ba79392c44c9e..23f25099040eb460bbb11d26038fd2df505cc094 100644 (file)
@@ -78,8 +78,6 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
     user = insert(:user)
 
     notification_settings = %{
-      "remote" => true,
-      "local" => true,
       "followers" => true,
       "follows" => true,
       "non_follows" => true,
index ca0b8cc260a72dee21c1dbce79a8726af7346821..cab9e5d904f79d0725e4c71fdeee467f2878f0ea 100644 (file)
@@ -102,7 +102,6 @@ defmodule Pleroma.Web.TwitterAPI.UtilControllerTest do
       conn
       |> assign(:user, user)
       |> put("/api/pleroma/notification_settings", %{
-        "remote" => false,
         "followers" => false,
         "bar" => 1
       })
@@ -111,8 +110,6 @@ defmodule Pleroma.Web.TwitterAPI.UtilControllerTest do
       user = Repo.get(User, user.id)
 
       assert %{
-               "remote" => false,
-               "local" => true,
                "followers" => false,
                "follows" => true,
                "non_follows" => true,