diff options
author | lain <lain@soykaf.club> | 2020-06-19 14:56:50 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-06-19 14:56:50 +0200 |
commit | 7e488cd4a7ac038dfe8a1f5b204cb134bb5ba549 (patch) | |
tree | a35a08cb24761e72c4be20b97a1833fdb26ca682 /test/web/mastodon_api/controllers/account_controller | |
parent | 015f9258a9bd1430ab079f449b118b664c3b9664 (diff) | |
parent | d772361e6209e6b5733e9fe52b3671cd222060b3 (diff) | |
download | pleroma-7e488cd4a7ac038dfe8a1f5b204cb134bb5ba549.tar.gz pleroma-7e488cd4a7ac038dfe8a1f5b204cb134bb5ba549.zip |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into update-validator
Diffstat (limited to 'test/web/mastodon_api/controllers/account_controller')
-rw-r--r-- | test/web/mastodon_api/controllers/account_controller/update_credentials_test.exs | 13 |
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 |