summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api/controllers/account_controller/update_credentials_test.exs
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2020-06-17 10:34:23 +0000
committerrinpatch <rinpatch@sdf.org>2020-06-17 10:34:23 +0000
commit4ec2fb967e0eb0559e39a6d698107f6af4d7a891 (patch)
tree6e6d3db526b16681c24e148c19c40073d21b7b4c /test/web/mastodon_api/controllers/account_controller/update_credentials_test.exs
parentbb68f9d27c81759132dc791c9fabdb54fbb5341d (diff)
parente1b07402ab077899dd5b9c0023fbe1c48af259e9 (diff)
downloadpleroma-4ec2fb967e0eb0559e39a6d698107f6af4d7a891.tar.gz
pleroma-4ec2fb967e0eb0559e39a6d698107f6af4d7a891.zip
Merge branch 'features/users-raw_bio' into 'develop'
User: Add raw_bio, storing unformatted bio See merge request pleroma/pleroma!2326
Diffstat (limited to 'test/web/mastodon_api/controllers/account_controller/update_credentials_test.exs')
-rw-r--r--test/web/mastodon_api/controllers/account_controller/update_credentials_test.exs13
1 files changed, 9 insertions, 4 deletions
diff --git a/test/web/mastodon_api/controllers/account_controller/update_credentials_test.exs b/test/web/mastodon_api/controllers/account_controller/update_credentials_test.exs
index 7c420985d..76e6d603a 100644
--- a/test/web/mastodon_api/controllers/account_controller/update_credentials_test.exs
+++ b/test/web/mastodon_api/controllers/account_controller/update_credentials_test.exs
@@ -83,10 +83,9 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController.UpdateCredentialsTest do
test "updates the user's bio", %{conn: conn} do
user2 = insert(:user)
- conn =
- patch(conn, "/api/v1/accounts/update_credentials", %{
- "note" => "I drink #cofe with @#{user2.nickname}\n\nsuya.."
- })
+ raw_bio = "I drink #cofe with @#{user2.nickname}\n\nsuya.."
+
+ conn = patch(conn, "/api/v1/accounts/update_credentials", %{"note" => raw_bio})
assert user_data = json_response_and_validate_schema(conn, 200)
@@ -94,6 +93,12 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController.UpdateCredentialsTest do
~s(I drink <a class="hashtag" data-tag="cofe" href="http://localhost:4001/tag/cofe">#cofe</a> with <span class="h-card"><a class="u-url mention" data-user="#{
user2.id
}" href="#{user2.ap_id}" rel="ugc">@<span>#{user2.nickname}</span></a></span><br/><br/>suya..)
+
+ assert user_data["source"]["note"] == raw_bio
+
+ user = Repo.get(User, user_data["id"])
+
+ assert user.raw_bio == raw_bio
end
test "updates the user's locking status", %{conn: conn} do