Add idempotency_key to the chat_message entity.
[akkoma] / test / pleroma / web / pleroma_api / controllers / chat_controller_test.exs
index 6381f9757e5f33ff429d51aa7dc8e38754f0c1a9..fa6b9db65ea5d44a88f1d83a54f02de5643d50f6 100644 (file)
@@ -82,11 +82,13 @@ defmodule Pleroma.Web.PleromaAPI.ChatControllerTest do
       result =
         conn
         |> put_req_header("content-type", "application/json")
+        |> put_req_header("idempotency-key", "123")
         |> post("/api/v1/pleroma/chats/#{chat.id}/messages", %{"content" => "Hallo!!"})
         |> json_response_and_validate_schema(200)
 
       assert result["content"] == "Hallo!!"
       assert result["chat_id"] == chat.id |> to_string()
+      assert result["idempotency_key"] == "123"
     end
 
     test "it fails if there is no content", %{conn: conn, user: user} do