_acs-authentication__auth_password_change (private)

 _acs-authentication__auth_password_change

Defined in packages/acs-authentication/tcl/test/acs-authentication-procs.tcl

Partial Call Graph (max 5 caller/called nodes):
%3 aa_equals aa_equals (public) aa_log aa_log (public) aa_log_result aa_log_result (public) aa_run_with_teardown aa_run_with_teardown (public) aa_stub aa_stub (public) _acs-authentication__auth_password_change _acs-authentication__auth_password_change _acs-authentication__auth_password_change->aa_equals _acs-authentication__auth_password_change->aa_log _acs-authentication__auth_password_change->aa_log_result _acs-authentication__auth_password_change->aa_run_with_teardown _acs-authentication__auth_password_change->aa_stub

Testcases:
No testcase defined.
Source code:
        
        set _aa_export {}
        set body_count 1
        foreach testcase_body {{
    aa_stub acs_mail_lite::send {
        set ::ns_sendmail_to $to_addr
    }

    aa_run_with_teardown  -rollback  -test_code {

            array set user_info [acs::test::user::create]
            set email    $user_info(email)
            set password $user_info(password)
            set user_id  $user_info(user_id)

            set ::ns_sendmail_to {ns_sendmail_UNCALLED}

            parameter::set_value -parameter EmailAccountOwnerOnPasswordChangeP  -package_id [ad_acs_kernel_id] -value 1
            aa_true "Send email" [parameter::get -parameter EmailAccountOwnerOnPasswordChangeP -package_id [ad_acs_kernel_id] -default 1]

            # password_status "ok"
            set old_password $password
            set new_password "changedyou"
            array set auth_info [auth::password::change  -user_id $user_id  -old_password $old_password  -new_password $new_password]
            aa_equals "Should return 'ok'"  $auth_info(password_status)  "ok"

            # Check that user gets email about changed password
            aa_equals "Email sent to user" [string tolower $::ns_sendmail_to] [string tolower $email]
            set ::ns_sendmail_to {}

            # check that the new password is actually set correctly
            set password_correct_p [ad_check_password $user_id $new_password]
            aa_equals "check that the new password is actually set correctly"  $password_correct_p  "1"

            ad_parameter_cache -delete [ad_acs_kernel_id] EmailAccountOwnerOnPasswordChangeP
            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_change (body $body_count): Error during execution: $msg, stack trace: \n$::errorInfo"
          }
          incr body_count
        }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: