diff options
author | link0ff <juri@linkov.net> | 2019-03-03 18:29:37 +0200 |
---|---|---|
committer | link0ff <juri@linkov.net> | 2019-03-03 18:29:37 +0200 |
commit | 19e2b852473ea4d371fb3d77e9344025e0499428 (patch) | |
tree | dcd43e823f7687767651e6eb0877b5b4aca53882 /test/web/mastodon_api/mastodon_api_controller_test.exs | |
parent | e278d470232f4e8081bbbe358137400074673e75 (diff) | |
parent | ace4231628ad1af08c8696fb7fe6983549f62631 (diff) | |
download | pleroma-19e2b852473ea4d371fb3d77e9344025e0499428.tar.gz pleroma-19e2b852473ea4d371fb3d77e9344025e0499428.zip |
Merge remote-tracking branch 'upstream/develop' into feature/openldap-support
Diffstat (limited to 'test/web/mastodon_api/mastodon_api_controller_test.exs')
-rw-r--r-- | test/web/mastodon_api/mastodon_api_controller_test.exs | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs index 3dfbc8669..f7f10662a 100644 --- a/test/web/mastodon_api/mastodon_api_controller_test.exs +++ b/test/web/mastodon_api/mastodon_api_controller_test.exs @@ -946,7 +946,6 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do other_user = Repo.get(User, other_user.id) assert User.following?(other_user, user) == false - assert user.info.follow_request_count == 1 conn = build_conn() @@ -960,7 +959,6 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do other_user = Repo.get(User, other_user.id) assert User.following?(other_user, user) == true - assert user.info.follow_request_count == 0 end test "verify_credentials", %{conn: conn} do @@ -982,7 +980,6 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do {:ok, _activity} = ActivityPub.follow(other_user, user) user = Repo.get(User, user.id) - assert user.info.follow_request_count == 1 conn = build_conn() @@ -996,7 +993,6 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do other_user = Repo.get(User, other_user.id) assert User.following?(other_user, user) == false - assert user.info.follow_request_count == 0 end end @@ -1744,6 +1740,18 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do } } + # works with private posts + {:ok, activity} = + CommonAPI.post(user, %{"status" => "http://example.com/ogp", "visibility" => "direct"}) + + response_two = + conn + |> assign(:user, user) + |> get("/api/v1/statuses/#{activity.id}/card") + |> json_response(200) + + assert response_two == response + Pleroma.Config.put([:rich_media, :enabled], false) end end |