_chat__web_chat_room_create (private)

 _chat__web_chat_room_create

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

Partial Call Graph (max 5 caller/called nodes):
aa_log aa_log (public) aa_log_result aa_log_result (public) aa_run_with_teardown aa_run_with_teardown (public) acs::test::user::create acs::test::user::create (public) acs::test::user::delete acs::test::user::delete (public) _chat__web_chat_room_create _chat__web_chat_room_create _chat__web_chat_room_create->aa_log _chat__web_chat_room_create->aa_log_result _chat__web_chat_room_create->aa_run_with_teardown _chat__web_chat_room_create->acs::test::user::create _chat__web_chat_room_create->acs::test::user::delete

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

            #
            # Create a new admin user
            #
            set user_info [acs::test::user::create -admin]
            set user_id [dict get $user_info user_id]

            #
            # Create a new chat
            #
            set pretty_name [ad_generate_random_string]
            set d [chat::test::new  -user_info $user_info  -pretty_name $pretty_name]
            set room_id [dict get $d payload room_id]
            aa_log "Created chat with id $room_id"

            #
            # View a chat via name.
            #
            set response [chat::test::view  -last_request $d  -room_id $room_id]

        } -teardown_code {
            #
            # Delete the chat.
            #
            if {$room_id != 0} {
                set r [::xo::db::Class get_instance_from_db -id $room_id]
                $r delete
            }
            acs::test::user::delete -user_id [dict get $user_info user_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" "web_chat_room_create (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: