_categories__category_link (private)

 _categories__category_link

Defined in packages/categories/tcl/test/categories-procs.tcl

Partial Call Graph (max 5 caller/called nodes):
%3 aa_false aa_false (public) aa_log aa_log (public) aa_log_result aa_log_result (public) aa_run_with_teardown aa_run_with_teardown (public) aa_true aa_true (public) _categories__category_link _categories__category_link _categories__category_link->aa_false _categories__category_link->aa_log _categories__category_link->aa_log_result _categories__category_link->aa_run_with_teardown _categories__category_link->aa_true

Testcases:
No testcase defined.
Source code:
        
        set _aa_export {}
        set body_count 1
        foreach testcase_body {{
    aa_run_with_teardown  -rollback  -test_code {

            set tree_id_1 [category_tree::add -name "foo"]

            set category_id_1 [category::add  -tree_id $tree_id_1  -parent_id ""  -name "foo cat"]

            set tree_id_2 [category_tree::add -name "bar"]

            set category_id_2 [category::add  -tree_id $tree_id_2  -parent_id ""  -name "bar cat"]

            set link_id [category_link::add  -from_category_id $category_id_1  -to_category_id $category_id_2]

            aa_true "Link was created" [db_0or1row check {
                select 1 from category_links
                where link_id = :link_id
                and from_category_id = :category_id_1
                and to_category_id = :category_id_2
            }]

            category_link::delete $link_id

            aa_false "Link was deleted" [db_0or1row check {
                select 1 from category_links
                where link_id = :link_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" "category_link (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: