summaryrefslogtreecommitdiff
path: root/test/polyjuice/client/endpoint/get_rooms_messages_test.exs
diff options
context:
space:
mode:
authorHubert Chathi <hubert@uhoreg.ca>2020-09-17 22:46:21 -0400
committerHubert Chathi <hubert@uhoreg.ca>2020-09-17 22:46:21 -0400
commit810f00a3c44dd5a2b35cb1428ba1a581b0c0acf4 (patch)
tree7abd29e058d4be9d3a62504d926d59b2bcd8b57e /test/polyjuice/client/endpoint/get_rooms_messages_test.exs
parentencode filename in URL (diff)
improve endpoint protocol and HttpSpec
Diffstat (limited to 'test/polyjuice/client/endpoint/get_rooms_messages_test.exs')
-rw-r--r--test/polyjuice/client/endpoint/get_rooms_messages_test.exs12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/polyjuice/client/endpoint/get_rooms_messages_test.exs b/test/polyjuice/client/endpoint/get_rooms_messages_test.exs
index 6d2002c..f1d8787 100644
--- a/test/polyjuice/client/endpoint/get_rooms_messages_test.exs
+++ b/test/polyjuice/client/endpoint/get_rooms_messages_test.exs
@@ -21,7 +21,7 @@ defmodule Polyjuice.Client.Endpoint.GetRoomsMessagesTest do
from: "token",
dir: :forward
} do
- http_spec = Polyjuice.Client.Endpoint.Proto.http_spec(endpoint, "https://example.com")
+ http_spec = Polyjuice.Client.Endpoint.Proto.http_spec(endpoint)
assert http_spec == %Polyjuice.Client.Endpoint.HttpSpec{
auth_required: true,
@@ -30,8 +30,8 @@ defmodule Polyjuice.Client.Endpoint.GetRoomsMessagesTest do
{"Accept", "application/json"}
],
method: :get,
- url:
- "https://example.com/_matrix/client/r0/rooms/%21roomid/messages?from=token&dir=f"
+ path: "_matrix/client/r0/rooms/%21roomid/messages",
+ query: [from: "token", dir: "f"]
}
assert Polyjuice.Client.Endpoint.Proto.transform_http_result(
@@ -59,7 +59,7 @@ defmodule Polyjuice.Client.Endpoint.GetRoomsMessagesTest do
limit: 20,
filter: %{}
} do
- http_spec = Polyjuice.Client.Endpoint.Proto.http_spec(endpoint, "https://example.com")
+ http_spec = Polyjuice.Client.Endpoint.Proto.http_spec(endpoint)
assert http_spec == %Polyjuice.Client.Endpoint.HttpSpec{
auth_required: true,
@@ -68,8 +68,8 @@ defmodule Polyjuice.Client.Endpoint.GetRoomsMessagesTest do
{"Accept", "application/json"}
],
method: :get,
- url:
- "https://example.com/_matrix/client/r0/rooms/%21roomid/messages?from=token&dir=b&to=endtoken&limit=20&filter=%7B%7D"
+ path: "_matrix/client/r0/rooms/%21roomid/messages",
+ query: [from: "token", dir: "b", to: "endtoken", limit: 20, filter: "{}"]
}
end
end