Index: openacs-4/packages/acs-subsite/tcl/test/acs-subsite-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/test/acs-subsite-procs.tcl,v diff -u -r1.12.2.15 -r1.12.2.16 --- openacs-4/packages/acs-subsite/tcl/test/acs-subsite-procs.tcl 28 Aug 2020 15:25:51 -0000 1.12.2.15 +++ openacs-4/packages/acs-subsite/tcl/test/acs-subsite-procs.tcl 28 Aug 2020 16:42:29 -0000 1.12.2.16 @@ -272,6 +272,9 @@ group_type::new acs_object_type::get group::new + group::get_id + group::title + group::description group::get group_type::delete _ @@ -311,6 +314,13 @@ -pretty_name $pretty_name \ $group_type] + set api_group_id [group::get_id -group_name $group_name] + aa_equals "group::get_id -group_name $group_name returns the same id as that from group::new" \ + $group_id $api_group_id + aa_true "group::get_id -group_name $group_name returns a valid object_id" [db_0or1row check { + select 1 from acs_objects where object_id = :api_group_id + }] + # Test group info set group [group::get -group_id $group_id] set expected_group_name [dict get $group group_name] @@ -319,6 +329,13 @@ aa_true "Group was created with supplied values: $group_name eq $expected_group_name && $pretty_name eq $expected_pretty_name" \ {$group_name eq $expected_group_name && $pretty_name eq $expected_pretty_name} + aa_equals "group::description returns the expected value" \ + [group::description -group_id $group_id] \ + [db_string description {select description from groups where group_id = :group_id}] + aa_equals "group::title returns the expected value" \ + [group::title -group_id $group_id] \ + [db_string title {select title from acs_objects where object_id = :group_id}] + } finally { # Cleanup group_type::delete -group_type $group_type