|
|
|
@ -96,7 +96,7 @@ defmodule Pleroma.Web.TwitterAPI.UtilControllerTest do
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
test "it imports with different nickname variations", %{conn: conn} do
|
|
|
|
|
test "it imports follows with different nickname variations", %{conn: conn} do
|
|
|
|
|
[user2, user3, user4, user5, user6] = insert_list(5, :user)
|
|
|
|
|
|
|
|
|
|
identifiers =
|
|
|
|
@ -160,6 +160,29 @@ defmodule Pleroma.Web.TwitterAPI.UtilControllerTest do
|
|
|
|
|
)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
test "it imports blocks with different nickname variations", %{conn: conn} do
|
|
|
|
|
[user2, user3, user4, user5, user6] = insert_list(5, :user)
|
|
|
|
|
|
|
|
|
|
identifiers =
|
|
|
|
|
[
|
|
|
|
|
user2.ap_id,
|
|
|
|
|
user3.nickname,
|
|
|
|
|
"@" <> user4.nickname,
|
|
|
|
|
user5.nickname <> "@localhost",
|
|
|
|
|
"@" <> user6.nickname <> "@localhost"
|
|
|
|
|
]
|
|
|
|
|
|> Enum.join(" ")
|
|
|
|
|
|
|
|
|
|
response =
|
|
|
|
|
conn
|
|
|
|
|
|> post("/api/pleroma/blocks_import", %{"list" => identifiers})
|
|
|
|
|
|> json_response(:ok)
|
|
|
|
|
|
|
|
|
|
assert response == "job started"
|
|
|
|
|
assert [job_result] = ObanHelpers.perform_all()
|
|
|
|
|
assert job_result == [user2, user3, user4, user5, user6]
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
describe "PUT /api/pleroma/notification_settings" do
|
|
|
|
|