diff options
author | lain <lain@soykaf.club> | 2020-04-21 18:23:00 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-04-21 18:23:00 +0200 |
commit | 66c2eb670b273d808f0a9c1ae087df064718ca3d (patch) | |
tree | 94750ae05b09e609a26a8f0904395ba9f6de0643 /test | |
parent | 97ad0c45977261df3068ca4f0c3febce3173c058 (diff) | |
download | pleroma-66c2eb670b273d808f0a9c1ae087df064718ca3d.tar.gz |
ChatController: Validate parameters.
Diffstat (limited to 'test')
-rw-r--r-- | test/web/pleroma_api/controllers/chat_controller_test.exs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/web/pleroma_api/controllers/chat_controller_test.exs b/test/web/pleroma_api/controllers/chat_controller_test.exs index 52a34d23f..84610e511 100644 --- a/test/web/pleroma_api/controllers/chat_controller_test.exs +++ b/test/web/pleroma_api/controllers/chat_controller_test.exs @@ -25,6 +25,7 @@ defmodule Pleroma.Web.PleromaAPI.ChatControllerTest do result = conn + |> put_req_header("content-type", "application/json") |> post("/api/v1/pleroma/chats/#{chat.id}/messages", %{"content" => "Hallo!!"}) |> json_response(200) @@ -56,7 +57,7 @@ defmodule Pleroma.Web.PleromaAPI.ChatControllerTest do result = conn - |> get("/api/v1/pleroma/chats/#{chat.id}/messages", %{"max_id" => List.last(result)["id"]}) + |> get("/api/v1/pleroma/chats/#{chat.id}/messages?max_id=#{List.last(result)["id"]}") |> json_response(200) assert length(result) == 10 @@ -132,7 +133,7 @@ defmodule Pleroma.Web.PleromaAPI.ChatControllerTest do result = conn - |> get("/api/v1/pleroma/chats", %{max_id: List.last(result)["id"]}) + |> get("/api/v1/pleroma/chats?max_id=#{List.last(result)["id"]}") |> json_response(200) assert length(result) == 10 |