diff options
| author | eal <eal@waifu.club> | 2018-12-16 13:15:34 +0200 | 
|---|---|---|
| committer | eal <eal@waifu.club> | 2018-12-16 13:15:34 +0200 | 
| commit | 4c783e35c09c74097257ce56fde74025db0024c6 (patch) | |
| tree | d4f4553430fdddd7369445c82d7968b05a2505f4 /test | |
| parent | 2592b3c81a5af20536c3cc9709e3971d6cfb1e68 (diff) | |
| download | pleroma-4c783e35c09c74097257ce56fde74025db0024c6.tar.gz pleroma-4c783e35c09c74097257ce56fde74025db0024c6.zip  | |
Mastodon API: Fix PUT /api/web/settings
Diffstat (limited to 'test')
| -rw-r--r-- | test/web/mastodon_api/mastodon_api_controller_test.exs | 14 | 
1 files changed, 14 insertions, 0 deletions
diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs index e8275d4ab..aec0f851c 100644 --- a/test/web/mastodon_api/mastodon_api_controller_test.exs +++ b/test/web/mastodon_api/mastodon_api_controller_test.exs @@ -1415,4 +1415,18 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do      assert result["stats"]["user_count"] == 2      assert result["stats"]["status_count"] == 1    end + +  test "put settings", %{conn: conn} do +    user = insert(:user) + +    conn = +      conn +      |> assign(:user, user) +      |> put("/api/web/settings", %{"data" => %{"programming" => "socks"}}) + +    assert result = json_response(conn, 200) + +    user = User.get_cached_by_ap_id(user.ap_id) +    assert user.info.settings == %{"programming" => "socks"} +  end  end  | 
