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 -N -r1.2 -r1.3 --- openacs-4/packages/news/tcl/test/news-db-test-init-oracle.xql 30 Sep 2003 12:10:08 -0000 1.2 +++ openacs-4/packages/news/tcl/test/news-db-test-init-oracle.xql 8 Oct 2003 08:47:59 -0000 1.3 @@ -159,7 +159,7 @@ begin - :1 := news.status(:p_news_id); + :1 := news.status(to_date(:p_publish_date, 'YYYY-MM-DD'), to_date(:p_archive_date, 'YYYY-MM-DD')); end; 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 -N -r1.1 -r1.2 --- openacs-4/packages/news/tcl/test/news-db-test-init-postgresql.xql 4 Apr 2003 09:48:13 -0000 1.1 +++ openacs-4/packages/news/tcl/test/news-db-test-init-postgresql.xql 8 Oct 2003 08:47:59 -0000 1.2 @@ -126,7 +126,7 @@ - select news__status(:p_news_id); + select news__status(to_timestamptz(:p_publish_date, 'YYYY-MM-DD'), to_timestamptz(:p_archive_date, 'YYYY-MM-DD')); 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 -N -r1.2 -r1.3 --- openacs-4/packages/news/tcl/test/news-db-test-init.tcl 30 Sep 2003 12:10:08 -0000 1.2 +++ openacs-4/packages/news/tcl/test/news-db-test-init.tcl 8 Oct 2003 08:47:59 -0000 1.3 @@ -486,12 +486,9 @@ Calls the news packages status function. p_news_id
} { - aa_export_vars {p_news_id status} - set status [db_exec_plsql get-status { - begin - :1 := news.status(:p_news_id); - end; - }] + aa_export_vars {p_publish_date p_archive_date status} + + set status [db_exec_plsql get-status {}] } @@ -1320,13 +1317,9 @@ # # Check the status of revision 1. # - aa_log "Calling news.status function on revision 1" - aa_log "Should be unapproved" set p_news_id $revision1_id aa_call_component db-news-status - aa_log "Status string is \"$status\"" - aa_true "Check status string contains \"unapproved\"" \ - {[string first "unapproved" $status] != -1} + aa_equals "Unapproved status" $status unapproved # # Approve revision 1 and set it as the live revision. @@ -1345,15 +1338,9 @@ # # Check the status of revision 1. # - aa_log "Calling news.status function on revision 1" - aa_log "Should be going live and not scheduled for archive" set p_news_id $revision1_id aa_call_component db-news-status - aa_log "Returned status = \"$status\"" - aa_true "Check status string contains \"going live in\"" \ - {[string first "going live in" $status] != -1} - aa_true "Check status string doesn't contain \"archived in\"" \ - {[string first "archived in" $status] == -1} + aa_equals "Going live no archive status" $status going_live_no_archive # # Approve revision 1 and set it as the live revision. @@ -1372,15 +1359,9 @@ # # Check the status of revision 1. # - aa_log "Calling news.status function on revision 1" - aa_log "Should be going live and scheduled for archive" set p_news_id $revision1_id aa_call_component db-news-status - aa_log "Returned status = \"$status\"" - aa_true "Check status string contains \"going live in\"" \ - {[string first "going live in" $status] != -1} - aa_true "Check status string contains \"archived in\"" \ - {[string first "archived in" $status] != -1} + aa_equals "Going live scheduled for archive status" $status going_live_with_archive # # Approve revision 1 and set it as the live revision. @@ -1399,15 +1380,9 @@ # # Check the status of revision 1. # - aa_log "Calling news.status function on revision 1" - aa_log "Should be published, and not scheduled for archive" set p_news_id $revision1_id aa_call_component db-news-status - aa_log "Returned status = \"$status\"" - aa_true "Check status string contains \"published\"" \ - {[string first "published" $status] != -1} - aa_true "Check status string contains \"not scheduled for archive\"" \ - {[string first "not scheduled for archive" $status] != -1} + aa_equals "Published no archive status" $status published_no_archive # # Approve revision 1 and set it as the live revision. @@ -1426,13 +1401,9 @@ # # Check the status of revision 1. # - aa_log "Calling news.status function on revision 1" - aa_log "Should be archived" set p_news_id $revision1_id aa_call_component db-news-status - aa_log "Returned status = \"$status\"" - aa_true "Check status string contains \"archived in\"" \ - {[string first "archived" $status] != -1} + aa_equals "Archived status" $status archived # # Approve revision 1 and set it as the live revision. @@ -1451,15 +1422,9 @@ # # Check the status of revision 1. # - aa_log "Calling news.status function on revision 1" - aa_log "Should be published, schedule for archive in future" set p_news_id $revision1_id aa_call_component db-news-status - aa_log "Returned status = \"$status\"" - aa_true "Check status string contains \"published\"" \ - {[string first "published" $status] != -1} - aa_true "Check status string contains \"archived in\"" \ - {[string first "archived in" $status] != -1} + aa_equals "Published with archive" $status published_with_archive } } { #