diff options
author | Rin Toshaka <rinpatch@sdf.org> | 2018-12-30 21:00:40 +0100 |
---|---|---|
committer | Rin Toshaka <rinpatch@sdf.org> | 2018-12-30 21:00:40 +0100 |
commit | dec23500d8988c22a99f049ef1d1e49328ba075a (patch) | |
tree | a6e16c5fa60b02058b1ebd985f20ac8f0f4ffa5b /test/web/mastodon_api/mastodon_api_controller_test.exs | |
parent | ab3089d6a718d4a70b0d702307d41e64e17bc505 (diff) | |
parent | dfde2622d0c14195392e306fadc7c729c68da273 (diff) | |
download | pleroma-dec23500d8988c22a99f049ef1d1e49328ba075a.tar.gz pleroma-dec23500d8988c22a99f049ef1d1e49328ba075a.zip |
Resolve merge conflict
Diffstat (limited to 'test/web/mastodon_api/mastodon_api_controller_test.exs')
-rw-r--r-- | test/web/mastodon_api/mastodon_api_controller_test.exs | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs index 433c135f7..0136acf8c 100644 --- a/test/web/mastodon_api/mastodon_api_controller_test.exs +++ b/test/web/mastodon_api/mastodon_api_controller_test.exs @@ -296,7 +296,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do assert %{} = json_response(conn, 200) - assert Repo.get(Activity, activity.id) == nil + refute Repo.get(Activity, activity.id) end test "when you didn't create it", %{conn: conn} do @@ -840,6 +840,26 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do assert [%{"id" => id}] = json_response(conn, 200) assert id == to_string(image_post.id) end + + test "gets a user's statuses without reblogs", %{conn: conn} do + user = insert(:user) + {:ok, post} = CommonAPI.post(user, %{"status" => "HI!!!"}) + {:ok, _, _} = CommonAPI.repeat(post.id, user) + + conn = + conn + |> get("/api/v1/accounts/#{user.id}/statuses", %{"exclude_reblogs" => "true"}) + + assert [%{"id" => id}] = json_response(conn, 200) + assert id == to_string(post.id) + + conn = + conn + |> get("/api/v1/accounts/#{user.id}/statuses", %{"exclude_reblogs" => "1"}) + + assert [%{"id" => id}] = json_response(conn, 200) + assert id == to_string(post.id) + end end describe "user relationships" do |