diff options
author | Hubert Chathi <hubert@uhoreg.ca> | 2020-08-08 09:39:54 -0400 |
---|---|---|
committer | Hubert Chathi <hubert@uhoreg.ca> | 2020-08-08 09:42:09 -0400 |
commit | 1911c71317706727426f864ece7b4bc9135ac62f (patch) | |
tree | fc4ff8760336b540faeedf955f1e684d528c8e93 /test/polyjuice | |
parent | check that the server response has a JSON content-type (diff) |
add test mode which changes post requests to put, so that mod_esi will accept it
Diffstat (limited to 'test/polyjuice')
-rw-r--r-- | test/polyjuice/client/sync_test.exs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/test/polyjuice/client/sync_test.exs b/test/polyjuice/client/sync_test.exs index 8f0f12c..f42e135 100644 --- a/test/polyjuice/client/sync_test.exs +++ b/test/polyjuice/client/sync_test.exs @@ -40,8 +40,6 @@ defmodule Polyjuice.Client.SyncTest do end defp handle_filter(session_id, _env, _input) do - # FIXME: can't actually test the filter, because mod_esi doesn't seem to - # like processing POST requests that also have extra path components :mod_esi.deliver( session_id, 'Content-Type: application/json\r\n\r\n{"filter_id":"1"}' @@ -219,11 +217,12 @@ defmodule Polyjuice.Client.SyncTest do base_url: "http://127.0.0.1:#{port}/Elixir.Polyjuice.Client.SyncTest.Httpd", access_token: "an_access_token", user_id: "@alice:example.org", - storage: storage + storage: storage, + test: true } {:ok, sync_pid} = - Polyjuice.Client.API.sync_child_spec(client, self()) + Polyjuice.Client.API.sync_child_spec(client, self(), filter: %{}) |> (fn %{start: {module, func, args}} -> apply(module, func, args) end).() assert_receive({:connected}) |