Index: openacs-4/packages/acs-tcl/tcl/test/test-membership-rel-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/test-membership-rel-procs.tcl,v diff -u -r1.7.2.2 -r1.7.2.3 --- openacs-4/packages/acs-tcl/tcl/test/test-membership-rel-procs.tcl 10 Feb 2023 19:07:31 -0000 1.7.2.2 +++ openacs-4/packages/acs-tcl/tcl/test/test-membership-rel-procs.tcl 27 Feb 2023 17:23:06 -0000 1.7.2.3 @@ -27,69 +27,69 @@ } { aa_run_with_teardown -rollback -test_code { - #we get a user_id as party_id + # We get a user_id as party_id set user_id [db_nextval acs_object_id_seq] - #Create the user + # Create the user set user_info [acs::test::user::create -user_id $user_id] set rel_id [db_string get_rel_id "select max(rel_id) from acs_rels where object_id_two = :user_id" -default 0] - #Try to change his state to approved + # Try to change his state to approved aa_log "We change the state to approved" membership_rel::approve -rel_id $rel_id - acs_user::get -user_id $user_id -array user + set member_state [acs_user::get -user_id $user_id -element member_state] - #Verifying if the state was changed + # Verifying if the state was changed aa_equals "Changed State to aprroved" \ - $user(member_state) "approved" + $member_state "approved" - - #Try to change his state to banned + + # Try to change his state to banned aa_log "We change the state to banned" membership_rel::ban -rel_id $rel_id - acs_user::get -user_id $user_id -array user + set member_state [acs_user::get -user_id $user_id -element member_state] - #Verifying if the state was changed + # Verifying if the state was changed aa_equals "Changed State to banned" \ - $user(member_state) "banned" + $member_state "banned" - #Try to change his state to rejected + # Try to change his state to rejected aa_log "We change the state to rejected" membership_rel::reject -rel_id $rel_id - acs_user::get -user_id $user_id -array user + set member_state [acs_user::get -user_id $user_id -element member_state] - #Verifying if the state was changed + # Verifying if the state was changed aa_equals "Changed State to rejected" \ - $user(member_state) "rejected" + $member_state "rejected" - #Try to change his state to unapproved + # Try to change his state to unapproved aa_log "We change the state to unapproved" membership_rel::unapprove -rel_id $rel_id - acs_user::get -user_id $user_id -array user + set member_state [acs_user::get -user_id $user_id -element member_state] - #Verifying if the state was changed + # Verifying if the state was changed aa_equals "Changed State to unapproved" \ - $user(member_state) "needs approval" + $member_state "needs approval" - #Try to change his state to expired + # Try to change his state to expired aa_log "We change the state to expired" membership_rel::expire -rel_id $rel_id - acs_user::get -user_id $user_id -array user + set member_state [acs_user::get -user_id $user_id -element member_state] - #Verifying if the state was changed + # Verifying if the state was changed aa_equals "Changed State to expired" \ - $user(member_state) "expired" + $member_state "expired" - #Try to change his state to deleted + # Try to change his state to deleted aa_log "We change the state to deleted" membership_rel::delete -rel_id $rel_id - acs_user::get -user_id $user_id -array user + set member_state [acs_user::get -user_id $user_id -element member_state] - #Verifying if the state was changed + # Verifying if the state was changed aa_equals "Changed State to deleted" \ - $user(member_state) "deleted" + $member_state "deleted" } } # Local variables: