diff options
author | Paweł Chmielowski <pchmielowski@process-one.net> | 2018-11-09 14:55:19 +0100 |
---|---|---|
committer | Paweł Chmielowski <pchmielowski@process-one.net> | 2018-11-09 14:55:19 +0100 |
commit | d43d9ff0e2170ab02764bc5961b8628029fb58b5 (patch) | |
tree | bd1bd0cea378cbda705bfb40490ef97b69b6bd42 /test/mod_http_api_test.exs | |
parent | Recover logging of user joining room, lost in 32de9a56 (thanks to elexis1) (diff) |
Fix mod_http_apt_test
Diffstat (limited to 'test/mod_http_api_test.exs')
-rw-r--r-- | test/mod_http_api_test.exs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/mod_http_api_test.exs b/test/mod_http_api_test.exs index 29405a3e..f7abbc00 100644 --- a/test/mod_http_api_test.exs +++ b/test/mod_http_api_test.exs @@ -61,15 +61,15 @@ defmodule ModHttpApiTest do test "Attempting to access a command that is not exposed as HTTP API returns 403" do setup_mocks() assert :ok == :ejabberd_commands.expose_commands([]) - request = request(method: :POST, ip: {{127,0,0,1},50000}, data: "[]") + request = request(method: :POST, ip: {{127,0,0,1},50000}, data: "{}") {403, _, _} = :mod_http_api.process(["open_cmd"], request) end test "Call to user, admin or restricted commands without authentication are rejected" do setup_mocks() assert :ok == :ejabberd_commands.expose_commands([:user_cmd, :admin_cmd, :restricted]) - request = request(method: :POST, ip: {{127,0,0,1},50000}, data: "[]") - {403, _, _} = :mod_http_api.process(["user_cmd"], request) + request = request(method: :POST, ip: {{127,0,0,1},50000}, data: "{}") + {400, _, _} = :mod_http_api.process(["user_cmd"], request) {403, _, _} = :mod_http_api.process(["admin_cmd"], request) {403, _, _} = :mod_http_api.process(["restricted_cmd"], request) end |