projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'bugfix/favicon-empty-test' into 'develop'
[akkoma]
/
test
/
web
/
twitter_api
/
util_controller_test.exs
diff --git
a/test/web/twitter_api/util_controller_test.exs
b/test/web/twitter_api/util_controller_test.exs
index 76e9369f79ef15f756baf71c34fb33ea18a06327..d164127eec448451706e6d965c7d84e50f42731c 100644
(file)
--- a/
test/web/twitter_api/util_controller_test.exs
+++ b/
test/web/twitter_api/util_controller_test.exs
@@
-191,7
+191,7
@@
defmodule Pleroma.Web.TwitterAPI.UtilControllerTest do
test "it updates notification settings", %{user: user, conn: conn} do
conn
|> put("/api/pleroma/notification_settings", %{
test "it updates notification settings", %{user: user, conn: conn} do
conn
|> put("/api/pleroma/notification_settings", %{
- "
followers" => fals
e,
+ "
block_from_strangers" => tru
e,
"bar" => 1
})
|> json_response(:ok)
"bar" => 1
})
|> json_response(:ok)
@@
-199,27
+199,21
@@
defmodule Pleroma.Web.TwitterAPI.UtilControllerTest do
user = refresh_record(user)
assert %Pleroma.User.NotificationSetting{
user = refresh_record(user)
assert %Pleroma.User.NotificationSetting{
- followers: false,
- follows: true,
- non_follows: true,
- non_followers: true,
- privacy_option: false
+ block_from_strangers: true,
+ hide_notification_contents: false
} == user.notification_settings
end
} == user.notification_settings
end
- test "it updates notification
privacy option
", %{user: user, conn: conn} do
+ test "it updates notification
settings to enable hiding contents
", %{user: user, conn: conn} do
conn
conn
- |> put("/api/pleroma/notification_settings", %{"
privacy_option
" => "1"})
+ |> put("/api/pleroma/notification_settings", %{"
hide_notification_contents
" => "1"})
|> json_response(:ok)
user = refresh_record(user)
assert %Pleroma.User.NotificationSetting{
|> json_response(:ok)
user = refresh_record(user)
assert %Pleroma.User.NotificationSetting{
- followers: true,
- follows: true,
- non_follows: true,
- non_followers: true,
- privacy_option: true
+ block_from_strangers: false,
+ hide_notification_contents: true
} == user.notification_settings
end
end
} == user.notification_settings
end
end
@@
-592,10
+586,16
@@
defmodule Pleroma.Web.TwitterAPI.UtilControllerTest do
end
end
end
end
- test "with proper permissions and valid password", %{conn: conn} do
+ test "with proper permissions and valid password", %{conn: conn
, user: user
} do
conn = post(conn, "/api/pleroma/delete_account", %{"password" => "test"})
conn = post(conn, "/api/pleroma/delete_account", %{"password" => "test"})
-
+ ObanHelpers.perform_all()
assert json_response(conn, 200) == %{"status" => "success"}
assert json_response(conn, 200) == %{"status" => "success"}
+
+ user = User.get_by_id(user.id)
+ assert user.deactivated == true
+ assert user.name == nil
+ assert user.bio == ""
+ assert user.password_hash == nil
end
end
end
end
end
end