diff options
author | lain <lain@soykaf.club> | 2018-11-16 19:47:36 +0100 |
---|---|---|
committer | lain <lain@soykaf.club> | 2018-11-16 19:47:36 +0100 |
commit | f87b315618cf55f5c0794ab0dfc5523bdce348ef (patch) | |
tree | 50557032f5b1facda1f15528d941a21a4eaddcd6 /test/web/twitter_api/twitter_api_controller_test.exs | |
parent | 2f639ea1292b1dee01b10fc78bbbe253a4592f2d (diff) | |
download | pleroma-f87b315618cf55f5c0794ab0dfc5523bdce348ef.tar.gz pleroma-f87b315618cf55f5c0794ab0dfc5523bdce348ef.zip |
TwitterAPI: Fix dm_timeline displaying only half of the conversation.
Diffstat (limited to 'test/web/twitter_api/twitter_api_controller_test.exs')
-rw-r--r-- | test/web/twitter_api/twitter_api_controller_test.exs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/test/web/twitter_api/twitter_api_controller_test.exs b/test/web/twitter_api/twitter_api_controller_test.exs index 1d45d9437..6bdcb4fd8 100644 --- a/test/web/twitter_api/twitter_api_controller_test.exs +++ b/test/web/twitter_api/twitter_api_controller_test.exs @@ -284,6 +284,12 @@ defmodule Pleroma.Web.TwitterAPI.ControllerTest do "visibility" => "direct" }) + {:ok, direct_two} = + CommonAPI.post(user_two, %{ + "status" => "Hi @#{user_one.nickname}!", + "visibility" => "direct" + }) + {:ok, _follower_only} = CommonAPI.post(user_one, %{ "status" => "Hi @#{user_two.nickname}!", @@ -296,8 +302,9 @@ defmodule Pleroma.Web.TwitterAPI.ControllerTest do |> assign(:user, user_two) |> get("/api/statuses/dm_timeline.json") - [status] = json_response(res_conn, 200) - assert status["id"] == direct.id + [status, status_two] = json_response(res_conn, 200) + assert status["id"] == direct_two.id + assert status_two["id"] == direct.id end end |