acs::test::reply_has_status_code (public)

 acs::test::reply_has_status_code [ -prefix prefix ] dict status_code

Defined in packages/acs-automated-testing/tcl/aa-test-procs.tcl

Convenience function for test cases to check, whether the reply has the given status code.

Switches:
-prefix (optional)
prefix for logging
Parameters:
dict (required)
request reply dict, containing at least the request status
status_code (required)
expected HTTP status codes

Partial Call Graph (max 5 caller/called nodes):
%3 test_ad_context_bar_multirow ad_context_bar_multirow (test acs-tcl) acs::test::reply_has_status_code acs::test::reply_has_status_code test_ad_context_bar_multirow->acs::test::reply_has_status_code test_create_form_with_form_instance create_form_with_form_instance (test xowiki) test_create_form_with_form_instance->acs::test::reply_has_status_code test_create_form_with_numeric create_form_with_numeric (test xowiki) test_create_form_with_numeric->acs::test::reply_has_status_code test_form_validate form_validate (test xowiki) test_form_validate->acs::test::reply_has_status_code test_front_page_1 front_page_1 (test acs-tcl) test_front_page_1->acs::test::reply_has_status_code aa_true aa_true (public) acs::test::reply_has_status_code->aa_true acs::test::detail_link acs::test::detail_link (private) acs::test::reply_has_status_code->acs::test::detail_link acs::test::confirm_email acs::test::confirm_email (public) acs::test::confirm_email->acs::test::reply_has_status_code acs::test::login acs::test::login (public) acs::test::login->acs::test::reply_has_status_code acs::test::logout acs::test::logout (public) acs::test::logout->acs::test::reply_has_status_code file_storage::test::add_file_to_folder file_storage::test::add_file_to_folder (private) file_storage::test::add_file_to_folder->acs::test::reply_has_status_code file_storage::test::create_new_folder file_storage::test::create_new_folder (private) file_storage::test::create_new_folder->acs::test::reply_has_status_code

Testcases:
webtest_example, password_recovery_page, front_page_1, ad_context_bar_multirow, create_form_with_form_instance, create_form_with_numeric, form_validate, nested_self_references
Source code:
        set result [expr {[dict get $dict status] == $status_code}]
        if {$result} {
            aa_true "${prefix}Reply has status code $status_code" $result
        } else {
            aa_true "${prefix}Reply expected status code $status_code but got [dict get $dict status] (<a href='[detail_link $dict]'>Details</a>)" $result
        }
        return $result
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: