faq::twt::delete (private)

 faq::twt::delete faq_name

Defined in packages/faq/tcl/test/tclwebtest-procs.tcl

Deletes a FAQ from the UI.

Parameters:
faq_name (required)

Partial Call Graph (max 5 caller/called nodes):
%3 aa_error aa_error (public) aa_get_first_url aa_get_first_url (public) aa_log aa_log (public) db_1row db_1row (public) export_vars export_vars (public) faq::twt::delete faq::twt::delete faq::twt::delete->aa_error faq::twt::delete->aa_get_first_url faq::twt::delete->aa_log faq::twt::delete->db_1row faq::twt::delete->export_vars

Testcases:
No testcase defined.
Source code:
        set response 0

        # The Faq page url
        set faq_page_url [aa_get_first_url -package_key faq]
        ::twt::do_request $faq_page_url

        tclwebtest::link follow "administer"

        db_1row faq_id "select faq_id from faqs where faq_name=:faq_name"
        ::twt::do_request [export_vars -base "faq-delete" {faq_id}]

        set response_url [tclwebtest::response url]

        if { [string match "*admin/*" $response_url] } {
            if {![catch {tclwebtest::link find "$faq_name" } errmsg]} {
                aa_error "faq::twt::delete failed $errmsg : Don't delete $faq_name Faq"
            } else {
                aa_log "Faq Deleted"
                set response 1
            }
        } else {
            aa_error "faq::twt::delete failed, bad response url : $response_url"
        }

        return $response
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: