Index: openacs-4/packages/acs-tcl/tcl/test/community-core-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/community-core-test-procs.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-tcl/tcl/test/community-core-test-procs.tcl 3 Jun 2009 13:33:32 -0000 1.5 +++ openacs-4/packages/acs-tcl/tcl/test/community-core-test-procs.tcl 7 Aug 2017 23:48:00 -0000 1.6 @@ -1,9 +1,6 @@ -# - ad_library { + Test cases for community core procs. - - @author byron Haroldo Linares Roman (bhlr@galileo.edu) @creation-date 2006-07-28 @arch-tag: 0D0EAC28-2481-4BEE-9645-A143B939DBCA @@ -24,10 +21,10 @@ aa_run_with_teardown -test_code { array set user_info [twt::user::create -user_id $user_id] - set user_id_p [cc_lookup_email_user $user_info(email)] + set user_id_p [party::get_by_email -email $user_info(email)] aa_true "User ID CORRECTO" \ [string match $user_id_p $user_info(user_id)] - set email_p [cc_email_from_party $user_info(user_id)] + set email_p [party::email -party_id $user_info(user_id)] aa_log "returns: $email_p , creation: $user_info(email)" aa_true "Email correcto" \ [string match $email_p [string tolower $user_info(email)]] @@ -62,7 +59,7 @@ set user_info(password) $password set user_info(email) $email - aa_log "Created user with email=\"$email\" and password=\"$password\"" + aa_log "Created user with email=\"$email\" and password=\"$password\" user_id=$user_info(user_id)" aa_run_with_teardown -rollback \ -test_code { @@ -77,9 +74,13 @@ aa_true "correct name" [string match [person::name -person_id $user_info(user_id)] "$first_names $last_name"] set prs_id [person::new -first_names $first_names -last_name $last_name -email "${email}s"] - set email_p [cc_email_from_party $prs_id] + set email_p [party::email -party_id $prs_id] aa_true "New person pass" [string match $email_p [string tolower "${email}s"]] - + + aa_log "New Person has user_id=$prs_id email_p=$email_p" + aa_log "Is this ID in persons ? [db_list _ {select * from persons where person_id=:prs_id}]" + aa_log "Is this ID in users ? [db_list _ {select * from cc_users where user_id=:prs_id}]" + person::update -person_id $prs_id -first_names "hh$first_names" -last_name "hh$last_name" aa_true "name changed" [string match [person::name -person_id $prs_id] "hh$first_names hh$last_name"] @@ -133,3 +134,9 @@ } } + +# Local variables: +# mode: tcl +# tcl-indent-level: 4 +# indent-tabs-mode: nil +# End: