Index: openacs-4/packages/acs-tcl/tcl/test/acs-tcl-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/acs-tcl-test-procs.tcl,v diff -u -r1.71.2.11 -r1.71.2.12 --- openacs-4/packages/acs-tcl/tcl/test/acs-tcl-test-procs.tcl 1 Jul 2019 14:47:06 -0000 1.71.2.11 +++ openacs-4/packages/acs-tcl/tcl/test/acs-tcl-test-procs.tcl 2 Sep 2019 15:55:39 -0000 1.71.2.12 @@ -1308,7 +1308,29 @@ aa_true "registered_user_p works correct" $works_p } +aa_register_case \ + -cats {api smoke} \ + -procs { + acs_user::ban + acs_user::approve + } \ + acs_user__ban_approve { + Tests the acs_user::ban and acs_user::approve procs + @author Héctor Romojaro + @creation-date 2019-09-02 +} { + # Retrieve a registered user + set user_id [db_string get_registered_id {select max(user_id) from registered_users}] + + # Ban and approve the user and check + aa_true "User is registered" [acs_user::registered_user_p -user_id $user_id] + acs_user::ban -user_id $user_id + aa_false "User banned" [acs_user::registered_user_p -user_id $user_id] + acs_user::approve -user_id $user_id + aa_true "User approved" [acs_user::registered_user_p -user_id $user_id] +} + aa_register_case \ -cats {api smoke} \ -procs ns_parseurl \