@@ -475,15 +475,34 @@ ibr(Config0) ->
475475 ? match (# iq {type = result , sub_els = [# register {username = <<>>}]},
476476 send_get_iq_register (Config3 )),
477477 ? match (# iq {type = result }, send_iq_register (Config3 , <<" some_self_chosen_name" >>)),
478+ RedirectUrl = <<" http://localhost" >>,
479+ NewRegisterOpts2 = gen_mod :set_opt (redirect_url , RedirectUrl , NewRegisterOpts ),
480+ update_module_opts (Server , mod_register , NewRegisterOpts2 ),
481+
482+ Config4 = reconnect (Config3 ),
483+ # invite_token {token = Token4 } = create_account_invite (Server , {<<>>, Server }),
484+ ? match (# iq {type = result }, send_pars (Config4 , Token4 )),
485+ # iq {type = result , sub_els = [# register {sub_els = SubEls }]} =
486+ send_get_iq_register (Config4 ),
487+ ? match ([], lists :filter (fun (El ) ->
488+ Decoded = xmpp :decode (El ),
489+ case Decoded of
490+ # oob_x {url = RedirectUrl } -> true ;
491+ _ -> false
492+ end
493+ end ,
494+ SubEls )),
495+ ? match (# iq {type = result }, send_iq_register (Config4 , <<" yet_another_self_chosen_name" >>)),
478496
479497 ejabberd_auth :remove_user (AccountName , Server ),
498+ ejabberd_auth :remove_user (<<" yet_another_self_chosen_name" >>, Server ),
480499 ejabberd_auth :remove_user (<<" some_self_chosen_name" >>, Server ),
481500 ejabberd_auth :remove_user (<<" some_much_better_name" >>, Server ),
482501 update_module_opts (Server , mod_register , OldRegisterOpts ),
483502 mod_invites :remove_user (<<" inviter" >>, Server ),
484503 mod_invites :expire_tokens (<<>>, Server ),
485- ? match (3 , mod_invites :cleanup_expired ()),
486- disconnect (Config3 ).
504+ ? match (4 , mod_invites :cleanup_expired ()),
505+ disconnect (Config4 ).
487506
488507ibr_reserved (Config0 ) ->
489508 Server = ? config (server , Config0 ),
0 commit comments