_forums__forum_enable_disable (private)
_forums__forum_enable_disable
Defined in packages/forums/tcl/test/forums-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 {{ # # Helper proc to check if the forum is enabled # proc forum_enabled_p {forum_id} { return [db_string enabled_p { select enabled_p from forums_forums where forum_id = :forum_id } -default "0"] } # # Start the tests # aa_run_with_teardown -rollback -test_code { # # Create forum # set package_id [subsite::main_site_id] set forum_id [forum::new -name "foo" -package_id $package_id] # # Enable forum if it is disabled # if {![forum_enabled_p $forum_id]} { forum::enable -forum_id $forum_id } aa_true "Forum $forum_id is enabled" [forum_enabled_p $forum_id] # # Disable # forum::disable -forum_id $forum_id aa_false "Forum $forum_id is enabled" [forum_enabled_p $forum_id] # # Enable again # forum::enable -forum_id $forum_id aa_true "Forum $forum_id is enabled" [forum_enabled_p $forum_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" "forum_enable_disable (body $body_count): Error during execution: $msg, stack trace: \n$::errorInfo" } incr body_count }XQL Not present: Generic, PostgreSQL, Oracle