update api to set skip_thread_containment
This commit is contained in:
parent
080e1aa70e
commit
f13d6c7f78
7 changed files with 60 additions and 5 deletions
|
|
@ -1495,7 +1495,7 @@ defmodule Pleroma.Web.TwitterAPI.ControllerTest do
|
|||
"hide_follows" => "false"
|
||||
})
|
||||
|
||||
user = Repo.get!(User, user.id)
|
||||
user = refresh_record(user)
|
||||
assert user.info.hide_follows == false
|
||||
assert json_response(conn, 200) == UserView.render("user.json", %{user: user, for: user})
|
||||
end
|
||||
|
|
@ -1548,6 +1548,29 @@ defmodule Pleroma.Web.TwitterAPI.ControllerTest do
|
|||
assert json_response(conn, 200) == UserView.render("user.json", %{user: user, for: user})
|
||||
end
|
||||
|
||||
test "it sets and un-sets skip_thread_containment", %{conn: conn} do
|
||||
user = insert(:user)
|
||||
|
||||
response =
|
||||
conn
|
||||
|> assign(:user, user)
|
||||
|> post("/api/account/update_profile.json", %{"skip_thread_containment" => "true"})
|
||||
|> json_response(200)
|
||||
|
||||
assert response["pleroma"]["skip_thread_containment"] == true
|
||||
user = refresh_record(user)
|
||||
assert user.info.skip_thread_containment
|
||||
|
||||
response =
|
||||
conn
|
||||
|> assign(:user, user)
|
||||
|> post("/api/account/update_profile.json", %{"skip_thread_containment" => "false"})
|
||||
|> json_response(200)
|
||||
|
||||
assert response["pleroma"]["skip_thread_containment"] == false
|
||||
refute refresh_record(user).info.skip_thread_containment
|
||||
end
|
||||
|
||||
test "it locks an account", %{conn: conn} do
|
||||
user = insert(:user)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue