Index: openacs-4/packages/acs-content-repository/tcl/test/content-revision-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/test/content-revision-test-procs.tcl,v diff -u -r1.2.2.1 -r1.2.2.2 --- openacs-4/packages/acs-content-repository/tcl/test/content-revision-test-procs.tcl 21 Dec 2004 18:22:33 -0000 1.2.2.1 +++ openacs-4/packages/acs-content-repository/tcl/test/content-revision-test-procs.tcl 14 Feb 2005 19:45:09 -0000 1.2.2.2 @@ -32,9 +32,10 @@ set returned_first_item_id [content::item::new \ -name "test_item_one" \ -item_id $first_item_id \ - -parent_id $first_folder_id] + -parent_id $first_folder_id \ + -storage_type "text"] - aa_true "First item created" [expr $first_item_id == $returned_first_item_id] + aa_true "First item created $first_item_id" [expr $first_item_id == $returned_first_item_id] # create a revision set revision_id [db_nextval "acs_object_id_seq"] @@ -47,10 +48,13 @@ -content "Test Content"] aa_true "Basic Revision created revision_id $revision_id returned_revision_id $returned_revision_id " [expr $revision_id == $returned_revision_id] - set r [db_string get_r {select revision_id from cr_revisions - where item_id=:first_item_id and title='Test Title' and - description='Test Description' and content='Test Content'} -default ""] - aa_true "Revision contains correct content" [expr $revision_id == $returned_revision_id] + ::item::get_content -revision_id $returned_revision_id -array revision_content + set revision_content(content) [cr_write_content -revision_id $returned_revision_id -string] + aa_true "Revision contains correct content" [expr \ + [string equal $revision_content(title) "Test Title"] \ + && [string equal $revision_content(content) "Test Content"] \ + && $revision_id == $revision_content(revision_id)] + content::item::delete -item_id $first_item_id content::folder::unregister_content_type \