diff options
author | lain <lain@soykaf.club> | 2020-06-08 11:09:53 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-06-08 11:09:53 +0200 |
commit | 89b85f65297ef4b8ce92eacb27c90e8f7c874f54 (patch) | |
tree | 279c5cce5651f36a1208cac4a9ec2dd8204df429 /test/web/pleroma_api/controllers/chat_controller_test.exs | |
parent | 7d66dd180ac98ab9b16463d2d71ab292f8fe07a0 (diff) | |
download | pleroma-89b85f65297ef4b8ce92eacb27c90e8f7c874f54.tar.gz pleroma-89b85f65297ef4b8ce92eacb27c90e8f7c874f54.zip |
ChatController: Remove nonsensical pagination.
Diffstat (limited to 'test/web/pleroma_api/controllers/chat_controller_test.exs')
-rw-r--r-- | test/web/pleroma_api/controllers/chat_controller_test.exs | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/test/web/pleroma_api/controllers/chat_controller_test.exs b/test/web/pleroma_api/controllers/chat_controller_test.exs index c2960956d..82e16741d 100644 --- a/test/web/pleroma_api/controllers/chat_controller_test.exs +++ b/test/web/pleroma_api/controllers/chat_controller_test.exs @@ -289,7 +289,7 @@ defmodule Pleroma.Web.PleromaAPI.ChatControllerTest do assert length(result) == 0 end - test "it paginates", %{conn: conn, user: user} do + test "it returns all chats", %{conn: conn, user: user} do Enum.each(1..30, fn _ -> recipient = insert(:user) {:ok, _} = Chat.get_or_create(user.id, recipient.ap_id) @@ -300,14 +300,7 @@ defmodule Pleroma.Web.PleromaAPI.ChatControllerTest do |> get("/api/v1/pleroma/chats") |> json_response_and_validate_schema(200) - assert length(result) == 20 - - result = - conn - |> get("/api/v1/pleroma/chats?max_id=#{List.last(result)["id"]}") - |> json_response_and_validate_schema(200) - - assert length(result) == 10 + assert length(result) == 30 end test "it return a list of chats the current user is participating in, in descending order of updates", |