mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +01:00
Test: Update to the new webadmin pages
This commit is contained in:
parent
5a34020d23
commit
4819baaa07
@ -108,6 +108,7 @@ max_fsm_queue: 1000
|
|||||||
queue_type: file
|
queue_type: file
|
||||||
modules:
|
modules:
|
||||||
mod_adhoc: []
|
mod_adhoc: []
|
||||||
|
mod_admin_extra: []
|
||||||
mod_admin_update_sql: []
|
mod_admin_update_sql: []
|
||||||
mod_announce: []
|
mod_announce: []
|
||||||
mod_configure: []
|
mod_configure: []
|
||||||
|
@ -76,10 +76,11 @@ adduser(Config) ->
|
|||||||
Body = make_query(
|
Body = make_query(
|
||||||
Config,
|
Config,
|
||||||
"server/" ++ binary_to_list(Server) ++ "/users/",
|
"server/" ++ binary_to_list(Server) ++ "/users/",
|
||||||
<<"newusername=", (mue(User))/binary, "&newuserpassword=",
|
<<"register/user=", (mue(User))/binary, "®ister/password=",
|
||||||
(mue(Password))/binary, "&addnewuser=Add+User">>),
|
(mue(Password))/binary, "®ister=Register">>),
|
||||||
Password = ejabberd_auth:get_password(User, Server),
|
Password = ejabberd_auth:get_password(User, Server),
|
||||||
?match({_, _}, binary:match(Body, <<"<a href='../user/">>)).
|
?match({_, _}, binary:match(Body, <<"User ", User/binary, "@", Server/binary,
|
||||||
|
" successfully registered">>)).
|
||||||
|
|
||||||
changepassword(Config) ->
|
changepassword(Config) ->
|
||||||
User = <<"userwebadmin-", (?config(user, Config))/binary>>,
|
User = <<"userwebadmin-", (?config(user, Config))/binary>>,
|
||||||
@ -89,10 +90,10 @@ changepassword(Config) ->
|
|||||||
Config,
|
Config,
|
||||||
"server/" ++ binary_to_list(Server)
|
"server/" ++ binary_to_list(Server)
|
||||||
++ "/user/" ++ binary_to_list(mue(User)) ++ "/",
|
++ "/user/" ++ binary_to_list(mue(User)) ++ "/",
|
||||||
<<"password=", (mue(Password))/binary,
|
<<"change_password/newpass=", (mue(Password))/binary,
|
||||||
"&chpassword=Change+Password">>),
|
"&change_password=Change+Password">>),
|
||||||
?match(Password, ejabberd_auth:get_password(User, Server)),
|
?match(Password, ejabberd_auth:get_password(User, Server)),
|
||||||
?match({_, _}, binary:match(Body, <<"<p class='result'>Submitted</p>">>)).
|
?match({_, _}, binary:match(Body, <<"<div class='result'><code>ok</code></div>">>)).
|
||||||
|
|
||||||
removeuser(Config) ->
|
removeuser(Config) ->
|
||||||
User = <<"userwebadmin-", (?config(user, Config))/binary>>,
|
User = <<"userwebadmin-", (?config(user, Config))/binary>>,
|
||||||
@ -101,7 +102,7 @@ removeuser(Config) ->
|
|||||||
Config,
|
Config,
|
||||||
"server/" ++ binary_to_list(Server)
|
"server/" ++ binary_to_list(Server)
|
||||||
++ "/user/" ++ binary_to_list(mue(User)) ++ "/",
|
++ "/user/" ++ binary_to_list(mue(User)) ++ "/",
|
||||||
<<"password=&removeuser=Remove+User">>),
|
<<"&unregister=Unregister">>),
|
||||||
false = ejabberd_auth:user_exists(User, Server),
|
false = ejabberd_auth:user_exists(User, Server),
|
||||||
?match(nomatch, binary:match(Body, <<"<h3>Last Activity</h3>20">>)).
|
?match(nomatch, binary:match(Body, <<"<h3>Last Activity</h3>20">>)).
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user