diff options
| author | eal <eal@waifu.club> | 2018-12-16 11:21:26 +0000 | 
|---|---|---|
| committer | eal <eal@waifu.club> | 2018-12-16 11:21:26 +0000 | 
| commit | 28478a9c4f652e67de659adb93155a0dfda4b09f (patch) | |
| tree | 305d95059b0a55552ab04bb84a0e2c32ddf3424a /test | |
| parent | 8b279aca5fec4ee38852e587e2d1d2a54392281b (diff) | |
| parent | 4c783e35c09c74097257ce56fde74025db0024c6 (diff) | |
| download | pleroma-28478a9c4f652e67de659adb93155a0dfda4b09f.tar.gz pleroma-28478a9c4f652e67de659adb93155a0dfda4b09f.zip  | |
Merge branch 'fix/masto-put-settings' into 'develop'
Mastodon API: Fix PUT /api/web/settings
See merge request pleroma/pleroma!557
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  | 
