diff --git a/ext/tag_edit/test.php b/ext/tag_edit/test.php index 1bb5b4b2..7ff277c2 100644 --- a/ext/tag_edit/test.php +++ b/ext/tag_edit/test.php @@ -21,5 +21,30 @@ class TagEditTest extends ShimmieWebTestCase { # FIXME: test mass tag editor } + + function testSourceEdit() { + $this->log_in_as_user(); + $image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx"); + $this->get_page("post/view/$image_id"); + $this->assert_title("Image $image_id: pbx"); + + $this->set_field("tag_edit__source", "example.com"); + $this->click("Set"); + $this->click("Source"); + $this->assert_title("Example Web Page"); + $this->back(); + + $this->set_field("tag_edit__source", "http://example.com"); + $this->click("Set"); + $this->click("Source"); + $this->assert_title("Example Web Page"); + $this->back(); + + $this->log_out(); + + $this->log_in_as_admin(); + $this->delete_image($image_id); + $this->log_out(); + } } ?>