Index: openacs-4/packages/acs-tcl/tcl/test/object-test-case-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/object-test-case-procs.tcl,v diff -u -r1.9.2.12 -r1.9.2.13 --- openacs-4/packages/acs-tcl/tcl/test/object-test-case-procs.tcl 6 Sep 2022 12:31:23 -0000 1.9.2.12 +++ openacs-4/packages/acs-tcl/tcl/test/object-test-case-procs.tcl 6 Sep 2022 12:41:07 -0000 1.9.2.13 @@ -270,8 +270,28 @@ } } +aa_register_case -cats { + api + smoke +} -procs { + db_table_exists + acs_object_type::get_table_name +} object_type_table_name { + Test the acs_object_type::get_table_name api +} { + db_foreach get_objects { + select object_type, table_name from acs_object_types + } { + aa_equals "Api retrieves the correct table name '$table_name' for object_type '$object_type'" \ + [acs_object_type::get_table_name -object_type $object_type] $table_name + if {$table_name ne ""} { + aa_true "Table 'table_name' exists" [db_table_exists $table_name] + } + } +} + # Local variables: # mode: tcl # tcl-indent-level: 4