remove all endpoints marked as deprecated (#91)
[akkoma] / test / pleroma / web / mastodon_api / controllers / notification_controller_test.exs
index 270b80946842a11088586d9fde35ccf57cbca15e..6507835871f736694b756ad6bf0fc34c169c4e66 100644 (file)
@@ -44,9 +44,7 @@ defmodule Pleroma.Web.MastodonAPI.NotificationControllerTest do
       |> get("/api/v1/notifications")
 
     expected_response =
-      "hi <span class=\"h-card\"><a class=\"u-url mention\" data-user=\"#{user.id}\" href=\"#{
-        user.ap_id
-      }\" rel=\"ugc\">@<span>#{user.nickname}</span></a></span>"
+      "hi <span class=\"h-card\"><a class=\"u-url mention\" data-user=\"#{user.id}\" href=\"#{user.ap_id}\" rel=\"ugc\">@<span>#{user.nickname}</span></a></span>"
 
     assert [%{"status" => %{"content" => response}} | _rest] =
              json_response_and_validate_schema(conn, 200)
@@ -133,31 +131,12 @@ defmodule Pleroma.Web.MastodonAPI.NotificationControllerTest do
     conn = get(conn, "/api/v1/notifications/#{notification.id}")
 
     expected_response =
-      "hi <span class=\"h-card\"><a class=\"u-url mention\" data-user=\"#{user.id}\" href=\"#{
-        user.ap_id
-      }\" rel=\"ugc\">@<span>#{user.nickname}</span></a></span>"
+      "hi <span class=\"h-card\"><a class=\"u-url mention\" data-user=\"#{user.id}\" href=\"#{user.ap_id}\" rel=\"ugc\">@<span>#{user.nickname}</span></a></span>"
 
     assert %{"status" => %{"content" => response}} = json_response_and_validate_schema(conn, 200)
     assert response == expected_response
   end
 
-  test "dismissing a single notification (deprecated endpoint)" do
-    %{user: user, conn: conn} = oauth_access(["write:notifications"])
-    other_user = insert(:user)
-
-    {:ok, activity} = CommonAPI.post(other_user, %{status: "hi @#{user.nickname}"})
-
-    {:ok, [notification]} = Notification.create_notifications(activity)
-
-    conn =
-      conn
-      |> assign(:user, user)
-      |> put_req_header("content-type", "application/json")
-      |> post("/api/v1/notifications/dismiss", %{"id" => to_string(notification.id)})
-
-    assert %{} = json_response_and_validate_schema(conn, 200)
-  end
-
   test "dismissing a single notification" do
     %{user: user, conn: conn} = oauth_access(["write:notifications"])
     other_user = insert(:user)