Index: openacs-4/packages/news/tcl/test/news-db-test-init-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/tcl/test/news-db-test-init-oracle.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/news/tcl/test/news-db-test-init-oracle.xql 8 Oct 2003 08:47:59 -0000 1.3 +++ openacs-4/packages/news/tcl/test/news-db-test-init-oracle.xql 9 Jul 2018 10:03:30 -0000 1.4 @@ -164,7 +164,7 @@ - + begin :1 := news.name(news_id => :p_news_id); Index: openacs-4/packages/news/tcl/test/news-db-test-init-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/tcl/test/news-db-test-init-postgresql.xql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/news/tcl/test/news-db-test-init-postgresql.xql 3 Aug 2005 23:41:14 -0000 1.5 +++ openacs-4/packages/news/tcl/test/news-db-test-init-postgresql.xql 9 Jul 2018 10:03:30 -0000 1.6 @@ -130,7 +130,7 @@ - + select news__name(:p_news_id); Index: openacs-4/packages/news/tcl/test/news-db-test-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/tcl/test/news-db-test-init.tcl,v diff -u -r1.15 -r1.16 --- openacs-4/packages/news/tcl/test/news-db-test-init.tcl 7 Apr 2018 09:09:49 -0000 1.15 +++ openacs-4/packages/news/tcl/test/news-db-test-init.tcl 9 Jul 2018 10:03:30 -0000 1.16 @@ -315,25 +315,9 @@ p_live_revision_p} if {$p_approve_p == "f"} { - db_exec_plsql set-approve-default { - begin - content_item.set_approve-default(revision_id => :p_revision_id, - approve_p => :p_approve_p); - end; - } + db_exec_plsql set-approve-default {} } else { - db_exec_plsql set-approve { - begin - content_item.set_approve(revision_id => :p_revision_id, - approve_p => :p_approve_p, - publish_date => :p_publish_date - archive_date => :p_archive_date, - approval_user => :p_approval_user, - approval_date => :p_approval_date, - approvel_ip => :p_approval_id, - live_revision_p => :p_live_revision_ip); - end; - } + db_exec_plsql set-approve {} } } @@ -571,13 +555,13 @@ ################################################################################ # -# Testcase check-views +# Testcase check_views # aa_register_case -cats { db config } -on_error { -} "check-views" { +} "check_views" { Checks the news related views. Checks that the views are valid by performing a select from each of them. } { @@ -656,7 +640,7 @@ ################################################################################ # -# Testcase check-object-type +# Testcase check_object_type # aa_register_case -cats { db @@ -665,7 +649,7 @@ The "news" object type doesn't exist, or has isn't configured correctly. The most probable cause of this is that the news package datamodel hasn't been installed. -} "check-object-type" { +} "check_object_type" { Checks the news object type. } { set news_type_exists_p [db_0or1row get-news-type-info { @@ -705,14 +689,14 @@ ################################################################################ # -# Testcase check-package-mount +# Testcase check_package_mount # aa_register_case -cats { db } -init_classes { mount-news-package } -on_error { -} "check-package-mount" { +} "check_package_mount" { Checks the mountability of the news package. } { aa_true "Check that the news package mount properly" $_news_package_mounted_p @@ -727,13 +711,13 @@ ################################################################################ # -# Testcase db-check-news_create +# Testcase db_check_news_create # aa_register_case -cats { db } -init_classes { mount-news-package -} "db-check-news-create" { +} "db_check_news_create" { Creates and deletes a simple news article. Checks contents of cr_news, cr_items and cr_revisions table after insert. Calls the news name function to retrieve the article name. Tests news.new, news.delete and news.name. @@ -813,12 +797,8 @@ # Call the news.name function to retrieve the item name. # aa_log "Call news.name function to retrieve title of content revision" - set p_news_id $news_id - set name [db_exec_plsql news-name { - begin - :1 := news.name(news_id => :p_news_id); - end; - }] + set p_news_id $news_id + set name [db_exec_plsql news-name {}] aa_equals "Check the return from news.name is correct" $name $p_title } } @@ -850,7 +830,7 @@ ################################################################################ # -# Testcase check-news-revision +# Testcase db_check_news_revision # aa_register_case -cats { db @@ -866,7 +846,7 @@

A posting here at the OpenACS bboard was started concerning this problem. -} "db-check-news-revision" { +} "db_check_news_revision" { Checks the news database functions for revision creation, deletion and management. Tests news.revison_new, news.revision_delete, news.revision_set_active functions. @@ -1014,13 +994,13 @@ ################################################################################ # -# Testcase check-news-archive +# Testcase db_check_news_archive # aa_register_case -cats { db } -init_classes { mount-news-package -} "db-check-news-archive" { +} "db_check_news_archive" { Checks the news database functions make_permanent and news_archive. } { set news_id -1 @@ -1115,13 +1095,13 @@ ################################################################################ # -# Testcase check-news-set-approve +# Testcase db_check_news_set_approve # aa_register_case -cats { db } -init_classes { mount-news-package -} "db-check-news-set-approve" { +} "db_check_news_set_approve" { Checks the news database function for approving/unapproving news articles. Tests news.set_approve function. } { @@ -1269,13 +1249,13 @@ ################################################################################ # -# Testcase check-news-status +# Testcase db_check_news_status # aa_register_case -cats { db } -init_classes { mount-news-package -} "db-check-news-status" { +} "db_check_news_status" { Checks the news database function that returns information about a news article publish and archive status. Tests news.status function. @@ -1336,7 +1316,7 @@ aa_log "Approving revision 1, setting archive date as null" set p_revision_id $revision1_id set p_approve_p "t" - set p_publish_date "2005-11-01" + set p_publish_date [clock format [clock scan "+ 1 year"] -format %Y-%m-%d] ; # in the future set p_archive_date [db_null] set p_approval_user [ad_conn "user_id"] set p_approval_date "2001-11-03" @@ -1357,7 +1337,7 @@ aa_log "Approving revision 1, setting archive date as future value" set p_revision_id $revision1_id set p_approve_p "t" - set p_publish_date "2005-11-01" + set p_publish_date [clock format [clock scan "+ 1 year"] -format %Y-%m-%d] ; # in the future set p_archive_date "2005-11-10" set p_approval_user [ad_conn "user_id"] set p_approval_date "2001-11-03" @@ -1421,7 +1401,7 @@ set p_revision_id $revision1_id set p_approve_p "t" set p_publish_date "2000-11-01" - set p_archive_date "2005-11-01" + set p_archive_date [clock format [clock scan "+ 1 year"] -format %Y-%m-%d] ; # in the future set p_approval_user [ad_conn "user_id"] set p_approval_date "2001-11-03" set p_approval_ip [ad_conn "peeraddr"]