summaryrefslogtreecommitdiff
path: root/test/polyjuice/client/endpoint/get_sync_test.exs
diff options
context:
space:
mode:
Diffstat (limited to 'test/polyjuice/client/endpoint/get_sync_test.exs')
-rw-r--r--test/polyjuice/client/endpoint/get_sync_test.exs23
1 files changed, 15 insertions, 8 deletions
diff --git a/test/polyjuice/client/endpoint/get_sync_test.exs b/test/polyjuice/client/endpoint/get_sync_test.exs
index ae03aed..02aa580 100644
--- a/test/polyjuice/client/endpoint/get_sync_test.exs
+++ b/test/polyjuice/client/endpoint/get_sync_test.exs
@@ -17,7 +17,7 @@ defmodule Polyjuice.Client.Endpoint.GetSyncTest do
test "GET sync" do
with endpoint = %Polyjuice.Client.Endpoint.GetSync{} 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,
@@ -26,7 +26,8 @@ defmodule Polyjuice.Client.Endpoint.GetSyncTest do
{"Accept", "application/json"}
],
method: :get,
- url: "https://example.com/_matrix/client/r0/sync?timeout=0"
+ path: "_matrix/client/r0/sync",
+ query: [timeout: 0]
}
assert Polyjuice.Client.Endpoint.Proto.transform_http_result(
@@ -53,7 +54,7 @@ defmodule Polyjuice.Client.Endpoint.GetSyncTest do
set_presence: :offline,
timeout: 120
} 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,
@@ -62,8 +63,14 @@ defmodule Polyjuice.Client.Endpoint.GetSyncTest do
{"Accept", "application/json"}
],
method: :get,
- url:
- "https://example.com/_matrix/client/r0/sync?timeout=120&since=token&full_state=true&filter=1&set_presence=offline"
+ path: "_matrix/client/r0/sync",
+ query: [
+ timeout: 120,
+ since: "token",
+ full_state: "true",
+ filter: "1",
+ set_presence: "offline"
+ ]
}
end
@@ -71,7 +78,7 @@ defmodule Polyjuice.Client.Endpoint.GetSyncTest do
filter: %{},
set_presence: :unavailable
} 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,
@@ -80,8 +87,8 @@ defmodule Polyjuice.Client.Endpoint.GetSyncTest do
{"Accept", "application/json"}
],
method: :get,
- url:
- "https://example.com/_matrix/client/r0/sync?timeout=0&filter=%7B%7D&set_presence=unavailable"
+ path: "_matrix/client/r0/sync",
+ query: [timeout: 0, filter: "{}", set_presence: "unavailable"]
}
end
end