_acs-authentication__auth_password_reset (private)
_acs-authentication__auth_password_reset
Defined in packages/acs-authentication/tcl/test/acs-authentication-procs.tcl
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set _aa_export {} set body_count 1 foreach testcase_body {{ # We don't want email to go out aa_stub auth::password::email_password { return } aa_run_with_teardown -rollback -test_code { array set create_result [acs::test::user::create] array set test_user [acs_user::get -user_id $create_result(user_id)] set test_user(email) $create_result(email) set test_user(password) $create_result(password) aa_equals "status should be ok for creating user" $create_result(creation_status) "ok" if { $create_result(creation_status) ne "ok" } { aa_log "Create-result: '[array get create_result]'" } array set reset_result [auth::password::reset -authority_id $test_user(authority_id) -username $test_user(username)] aa_equals "status should be ok for resetting password" $reset_result(password_status) "ok" aa_true "Result contains new password" [info exists reset_result(password)] if { [info exists reset_result(password)] } { array set auth_result [auth::authentication::authenticate -username $test_user(username) -authority_id $test_user(authority_id) -password $reset_result(password)] aa_equals "can authenticate with new password" $auth_result(auth_status) "ok" array unset auth_result array set auth_result [auth::authentication::authenticate -username $test_user(username) -authority_id $test_user(authority_id) -password $test_user(password)] aa_false "cannot authenticate with old password" [string equal $auth_result(auth_status) "ok"] } set user_id [acs_user::get_by_username -authority_id $test_user(authority_id) -username $test_user(username)] if { $user_id ne "" } { acs_user::delete -user_id $user_id } } }} { aa_log "Running testcase body $body_count" set ::__aa_test_indent [info level] set catch_val [catch $testcase_body msg] if {$catch_val != 0 && $catch_val != 2} { aa_log_result "fail" "auth_password_reset (body $body_count): Error during execution: $msg, stack trace: \n$::errorInfo" } incr body_count }XQL Not present: Generic, PostgreSQL, Oracle