_acs-content-repository__content_folder (private)
_acs-content-repository__content_folder
Defined in packages/acs-content-repository/tcl/test/content-folder-test-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 {{ aa_run_with_teardown -rollback -test_code { ######################################################### # create a cr_folder ######################################################### set first_folder_id [db_nextval "acs_object_id_seq"] set returned_first_folder_id [content::folder::new -folder_id $first_folder_id -name "test_folder_${first_folder_id}"] # allow subfolders inside our parent test folder content::folder::register_content_type -folder_id $first_folder_id -content_type content_folder ######################################################### # Update the folder ######################################################### content::folder::update -folder_id $first_folder_id -attributes {{label new_label} {description new_description}} content::item::get -item_id $first_folder_id -array_name first_folder aa_true "Folder updated" {($first_folder(label) eq "new_label") && ($first_folder(description) eq "new_description")} ######################################################### # create a child folder ######################################################### set child_folder_id [db_nextval "acs_object_id_seq"] set returned_child_folder_id [content::folder::new -folder_id $child_folder_id -parent_id $first_folder_id -name "test_folder_${first_folder_id}"] ######################################################### # check if child is a subfolder of parent ######################################################### set is_subfolder [content::folder::is_sub_folder -folder_id $first_folder_id -target_folder_id $child_folder_id] aa_true "Child is subfolder" $is_subfolder ######################################################### # make sure parent is not a subfolder of child ######################################################### set is_subfolder [content::folder::is_sub_folder -folder_id $child_folder_id -target_folder_id $first_folder_id] aa_false "Parent is not subfolder of child" $is_subfolder } }} { 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" "content_folder (body $body_count): Error during execution: $msg, stack trace: \n$::errorInfo" } incr body_count }XQL Not present: Generic, PostgreSQL, Oracle