Birthdays: hide_birthday -> show_birthday
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
aaa9314f4c
commit
0266bc3c96
14 changed files with 39 additions and 37 deletions
|
|
@ -380,14 +380,14 @@ defmodule Pleroma.Web.MastodonAPI.UpdateCredentialsTest do
|
|||
assert user_data["pleroma"]["birthday"] == "2001-02-12"
|
||||
end
|
||||
|
||||
test "updates the user's hide_birthday status", %{conn: conn} do
|
||||
test "updates the user's show_birthday status", %{conn: conn} do
|
||||
res =
|
||||
patch(conn, "/api/v1/accounts/update_credentials", %{
|
||||
"hide_birthday" => true
|
||||
"show_birthday" => true
|
||||
})
|
||||
|
||||
assert user_data = json_response_and_validate_schema(res, 200)
|
||||
assert user_data["pleroma"]["hide_birthday"] == true
|
||||
assert user_data["pleroma"]["source"]["show_birthday"] == true
|
||||
end
|
||||
|
||||
test "emojis in fields labels", %{conn: conn} do
|
||||
|
|
|
|||
|
|
@ -312,12 +312,14 @@ defmodule Pleroma.Web.PleromaAPI.AccountControllerTest do
|
|||
%{id: id1} =
|
||||
user1 =
|
||||
insert(:user, %{
|
||||
birthday: "2001-02-12"
|
||||
birthday: "2001-02-12",
|
||||
show_birthday: true
|
||||
})
|
||||
|
||||
user2 =
|
||||
insert(:user, %{
|
||||
birthday: "2001-02-14"
|
||||
birthday: "2001-02-14",
|
||||
show_birthday: true
|
||||
})
|
||||
|
||||
user3 = insert(:user)
|
||||
|
|
@ -328,7 +330,7 @@ defmodule Pleroma.Web.PleromaAPI.AccountControllerTest do
|
|||
|
||||
[%{"id" => ^id1}] =
|
||||
conn
|
||||
|> get("/api/v1/pleroma/birthday_reminders?day=12&month=2")
|
||||
|> get("/api/v1/pleroma/birthdays?day=12&month=2")
|
||||
|> json_response_and_validate_schema(:ok)
|
||||
end
|
||||
|
||||
|
|
@ -338,14 +340,14 @@ defmodule Pleroma.Web.PleromaAPI.AccountControllerTest do
|
|||
user1 =
|
||||
insert(:user, %{
|
||||
birthday: "2001-02-12",
|
||||
hide_birthday: true
|
||||
show_birthday: false
|
||||
})
|
||||
|
||||
%{id: id2} =
|
||||
user2 =
|
||||
insert(:user, %{
|
||||
birthday: "2001-02-12",
|
||||
hide_birthday: false
|
||||
show_birthday: true
|
||||
})
|
||||
|
||||
CommonAPI.follow(user, user1)
|
||||
|
|
@ -353,7 +355,7 @@ defmodule Pleroma.Web.PleromaAPI.AccountControllerTest do
|
|||
|
||||
[%{"id" => ^id2}] =
|
||||
conn
|
||||
|> get("/api/v1/pleroma/birthday_reminders?day=12&month=2")
|
||||
|> get("/api/v1/pleroma/birthdays?day=12&month=2")
|
||||
|> json_response_and_validate_schema(:ok)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue