Index: openacs-4/packages/acs-authentication/tcl/test/authentication-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-authentication/tcl/test/Attic/authentication-procs.tcl,v diff -u -r1.1.2.7 -r1.1.2.8 --- openacs-4/packages/acs-authentication/tcl/test/authentication-procs.tcl 5 Oct 2021 16:15:59 -0000 1.1.2.7 +++ openacs-4/packages/acs-authentication/tcl/test/authentication-procs.tcl 6 Oct 2021 09:48:37 -0000 1.1.2.8 @@ -269,59 +269,6 @@ aa_register_case \ -cats {api} \ -procs { - auth::get_user_id - } \ - auth__get_user_id { - Test auth::get_user_id - } { - # We will just mess about with the ad_conn variables used - # inside the proc to simulate a few possible situations. - set prev_untrusted_user_id [ad_conn untrusted_user_id] - set prev_account_status [ad_conn account_status] - set prev_auth_level [ad_conn auth_level] - - set user_id [ad_conn user_id] - - set bogus_user [db_string get_bogus_user { - select max(user_id) + 1 from users - }] - - aa_run_with_teardown \ - -rollback \ - -test_code { - foreach { - untrusted_user_id account_status auth_level - wanted_level wanted_account_status - expected_result - } [list \ - 0 whatever none 1234 whatever 0 \ - $user_id ok ok ok ok $user_id \ - $user_id ok ok secure ok [expr {[security::https_available_p] ? 0 : $user_id}] \ - $user_id ok secure secure ok $user_id \ - $user_id ok secure secure whatever $user_id \ - $bogus_user ok secure secure ok $bogus_user \ - $bogus_user ko secure secure ok 0 \ - ] { - ad_conn -set untrusted_user_id $untrusted_user_id - ad_conn -set account_status $account_status - ad_conn -set auth_level $auth_level - - set v [auth::get_user_id \ - -level $wanted_level \ - -account_status $wanted_account_status] - aa_equals "For user '$untrusted_user_id', level '$wanted_level', account_status '$wanted_account_status' the result should be '$expected_result'" \ - $v $expected_result - } - } -teardown_code { - ad_conn -set untrusted_user_id $prev_untrusted_user_id - ad_conn -set account_status $prev_account_status - ad_conn -set auth_level $prev_auth_level - } - } - -aa_register_case \ - -cats {api} \ - -procs { auth::login_attempts::get_all auth::login_attempts::reset auth::login_attempts::reset_all