_acs-subsite__acs_subsite_group_type (private)
_acs-subsite__acs_subsite_group_type
Defined in packages/acs-subsite/tcl/test/acs-subsite-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 {{ set group_type "aa_test_group_type" try { # Make sure the group type does not exist group_type::delete -group_type $group_type # Create the group type set pretty_name "Test Group" set pretty_plural "Test Groups" set returned_group_type [group_type::new -group_type $group_type -supertype "group" $pretty_name $pretty_plural] aa_true "Function returns the expected value (the group type)" {$group_type eq $returned_group_type} # Test group type info acs_object_type::get -object_type $group_type -array type aa_true "Group type is an ACS Object created with expected values" {$pretty_name eq $type(pretty_name) && $pretty_plural eq $type(pretty_plural)} # Create a group type instance set group_name "${group_type}_instance_1" set pretty_name "${pretty_name} Instance 1" set group_id [group::new -group_name $group_name -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] # Pretty name is stored in an automatically generated message key set expected_pretty_name [_ [string trim [dict get $group title] "#"]] 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 } }} { 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" "acs_subsite_group_type (body $body_count): Error during execution: $msg, stack trace: \n$::errorInfo" } incr body_count }XQL Not present: Generic, PostgreSQL, Oracle