From 1a3fa68adef88e9b1fc8466b12fbdc1a92f36d7a Mon Sep 17 00:00:00 2001 From: Shish Date: Fri, 12 Mar 2010 18:48:30 +0000 Subject: [PATCH] image ext tests --- ext/image/test.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ext/image/test.php b/ext/image/test.php index 996b5516..0bb36eef 100644 --- a/ext/image/test.php +++ b/ext/image/test.php @@ -4,12 +4,20 @@ class ImageTest extends ShimmieWebTestCase { $this->log_in_as_user(); $image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "test"); + # test collision + $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "test"); + $this->assert_text("already has hash"); + $this->get_page("user/test"); $this->assert_text("Images uploaded: 1"); $this->click("Images uploaded"); $this->assert_title("Image $image_id: test"); $this->log_out(); + # test that serving manually doesn't cause errors + $this->get_page("image/$image_id/moo.jpg"); + $this->get_page("thumb/$image_id/moo.jpg"); + $this->log_in_as_admin(); $this->delete_image($image_id); $this->log_out();