From 4b3fb0de8686574eddcc4436b487d3d0df95f8e3 Mon Sep 17 00:00:00 2001 From: Shish Date: Wed, 12 Aug 2009 15:45:13 +0100 Subject: [PATCH] test deleting one comment at a time --- ext/comment/test.php | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/ext/comment/test.php b/ext/comment/test.php index 286f8858..e9c93128 100644 --- a/ext/comment/test.php +++ b/ext/comment/test.php @@ -52,8 +52,27 @@ class CommentListTest extends ShimmieWebTestCase { $this->log_in_as_admin(); $this->delete_image($image_id); $this->log_out(); + } - # FIXME: test deleting one comment at a time + function testSingleDel() { + $this->log_in_as_admin(); + $image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx"); + + # make a comment + $this->get_page("post/view/$image_id"); + $this->setField('comment', "Test Comment ASDFASDF"); + $this->click("Post Comment"); + $this->assertTitle("Image $image_id: pbx"); + $this->assertText("ASDFASDF"); + + # delete it + $this->click("Del"); + $this->assertTitle("Image $image_id: pbx"); + $this->assertNoText("ASDFASDF"); + + # tidy up + $this->delete_image($image_id); + $this->log_out(); } } ?>