Index: openacs-4/packages/new-portal/tcl/test/new-portal-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/tcl/test/new-portal-test-procs.tcl,v diff -u -r1.4.2.3 -r1.4.2.4 --- openacs-4/packages/new-portal/tcl/test/new-portal-test-procs.tcl 18 Feb 2021 15:45:31 -0000 1.4.2.3 +++ openacs-4/packages/new-portal/tcl/test/new-portal-test-procs.tcl 18 Feb 2021 15:47:10 -0000 1.4.2.4 @@ -10,41 +10,41 @@ Create a portal from a template } { aa_run_with_teardown \ - -rollback \ - -test_code { - # create a new portal template + -rollback \ + -test_code { + # create a new portal template + # create a test user + array set test_user [acs::test::user::create] - # create a test user - array set test_user [acs::test::user::create] + set template_id [portal::create $test_user(user_id)] - set template_id [portal::create $test_user(user_id)] + portal::page_create \ + -pretty_name "Page 3" \ + -portal_id $template_id - portal::page_create \ - -pretty_name "Page 3" \ - -portal_id $template_id + portal::page_create \ + -pretty_name "Page 2" \ + -portal_id $template_id - portal::page_create \ - -pretty_name "Page 2" \ - -portal_id $template_id + # create a portal based on the template + array set test_user_2 [acs::test::user::create] - # create a portal based on the template - array set test_user_2 [acs::test::user::create] + set portal_id_2 [portal::create -template_id $template_id $test_user_2(user_id)] - set portal_id_2 [portal::create -template_id $template_id $test_user_2(user_id)] - - # make sure the pages exist and are in the same order + # make sure the pages exist and are in the same order set correct_page_count [db_string count_correct_pages " - select count(*) from portal_pages p1, portal_pages p2 - where p1.portal_id = :template_id - and p2.portal_id = :portal_id_2 - and p1.pretty_name = p2.pretty_name - "] + select count(*) + from portal_pages p1, portal_pages p2 + where p1.portal_id = :template_id + and p2.portal_id = :portal_id_2 + and p1.pretty_name = p2.pretty_name + "] aa_true "Pages in correct order" {$correct_page_count == 3} - } - + } } + # Local variables: # mode: tcl # tcl-indent-level: 4