diff options
Diffstat (limited to 'test/web/mastodon_api')
4 files changed, 12 insertions, 14 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 fdb6d4c5d..696228203 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 @@ -112,6 +112,13 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController.UpdateCredentialsTest do        assert user_data["source"]["privacy"] == "unlisted"      end +    test "updates the user's privacy", %{conn: conn} do +      conn = patch(conn, "/api/v1/accounts/update_credentials", %{source: %{privacy: "unlisted"}}) + +      assert user_data = json_response_and_validate_schema(conn, 200) +      assert user_data["source"]["privacy"] == "unlisted" +    end +      test "updates the user's hide_followers status", %{conn: conn} do        conn = patch(conn, "/api/v1/accounts/update_credentials", %{hide_followers: "true"}) diff --git a/test/web/mastodon_api/controllers/instance_controller_test.exs b/test/web/mastodon_api/controllers/instance_controller_test.exs index 2c61dc5ba..8bdfdddd1 100644 --- a/test/web/mastodon_api/controllers/instance_controller_test.exs +++ b/test/web/mastodon_api/controllers/instance_controller_test.exs @@ -31,7 +31,8 @@ defmodule Pleroma.Web.MastodonAPI.InstanceControllerTest do               "upload_limit" => _,               "avatar_upload_limit" => _,               "background_upload_limit" => _, -             "banner_upload_limit" => _ +             "banner_upload_limit" => _, +             "background_image" => _             } = result      assert result["pleroma"]["metadata"]["features"] diff --git a/test/web/mastodon_api/controllers/status_controller_test.exs b/test/web/mastodon_api/controllers/status_controller_test.exs index bdee88fd3..962e64b03 100644 --- a/test/web/mastodon_api/controllers/status_controller_test.exs +++ b/test/web/mastodon_api/controllers/status_controller_test.exs @@ -62,7 +62,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do          |> post("/api/v1/statuses", %{            "status" => "cofe",            "spoiler_text" => "2hu", -          "sensitive" => "false" +          "sensitive" => "0"          })        {:ok, ttl} = Cachex.ttl(:idempotency_cache, idempotency_key) @@ -81,7 +81,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do          |> post("/api/v1/statuses", %{            "status" => "cofe",            "spoiler_text" => "2hu", -          "sensitive" => "false" +          "sensitive" => 0          })        assert %{"id" => second_id} = json_response(conn_two, 200) @@ -93,7 +93,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do          |> post("/api/v1/statuses", %{            "status" => "cofe",            "spoiler_text" => "2hu", -          "sensitive" => "false" +          "sensitive" => "False"          })        assert %{"id" => third_id} = json_response_and_validate_schema(conn_three, 200) diff --git a/test/web/mastodon_api/views/status_view_test.exs b/test/web/mastodon_api/views/status_view_test.exs index 5d7adbe29..43e3bdca1 100644 --- a/test/web/mastodon_api/views/status_view_test.exs +++ b/test/web/mastodon_api/views/status_view_test.exs @@ -620,14 +620,4 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do      assert status.visibility == "list"    end - -  test "successfully renders a Listen activity (pleroma extension)" do -    listen_activity = insert(:listen) - -    status = StatusView.render("listen.json", activity: listen_activity) - -    assert status.length == listen_activity.data["object"]["length"] -    assert status.title == listen_activity.data["object"]["title"] -    assert_schema(status, "Status", Pleroma.Web.ApiSpec.spec()) -  end  end | 
