diff options
author | Arjan Scherpenisse <arjan@scherpenisse.net> | 2021-02-19 12:49:05 +0100 |
---|---|---|
committer | Arjan Scherpenisse <arjan@scherpenisse.net> | 2021-02-20 09:08:56 +0100 |
commit | c9585ce4bd5d066a18389f57b8675c7ffa4fa74a (patch) | |
tree | 0da6dd51bbf3142338e4e35c7b447f9672fefccd | |
parent | Merge branch 'profile_function' into 'master' (diff) |
Move defmodule out of client test so each test can be run individually
-rw-r--r-- | test/polyjuice/client_test.exs | 10 | ||||
-rw-r--r-- | test/support/client_test.ex | 9 |
2 files changed, 9 insertions, 10 deletions
diff --git a/test/polyjuice/client_test.exs b/test/polyjuice/client_test.exs index 089c97f..aad44a3 100644 --- a/test/polyjuice/client_test.exs +++ b/test/polyjuice/client_test.exs @@ -72,16 +72,6 @@ defmodule Polyjuice.ClientTest do end end - defmodule Httpd.LoggedOut do - # just tells the user that they were logged out, no matter what - def _matrix(session_id, _env, _input) do - :mod_esi.deliver( - session_id, - 'Status: 401 Unauthorized\r\nContent-Type: application/json\r\n\r\n{"errcode":"M_UNKNOWN_TOKEN","error":"Unknown token"}' - ) - end - end - test "transaction_id is unique" do client = %Polyjuice.Client{ base_url: "http://localhost:8008", diff --git a/test/support/client_test.ex b/test/support/client_test.ex new file mode 100644 index 0000000..c9fd2b8 --- /dev/null +++ b/test/support/client_test.ex @@ -0,0 +1,9 @@ +defmodule Polyjuice.ClientTest.Httpd.LoggedOut do + # just tells the user that they were logged out, no matter what + def _matrix(session_id, _env, _input) do + :mod_esi.deliver( + session_id, + 'Status: 401 Unauthorized\r\nContent-Type: application/json\r\n\r\n{"errcode":"M_UNKNOWN_TOKEN","error":"Unknown token"}' + ) + end +end |