a load more tests

This commit is contained in:
Shish
2009-07-19 04:48:25 +01:00
parent fd044838f3
commit d8e027b776
18 changed files with 265 additions and 30 deletions

View File

@ -0,0 +1,23 @@
<?php
class ReportImageTest extends ShimmieWebTestCase {
function testReportImage() {
$this->log_in_as_user();
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx computer screenshot");
$this->get_page("post/view/$image_id");
$this->setField('reason', "report details");
$this->click("Report");
$this->log_out();
$this->log_in_as_admin();
$this->get_page("image_report/list");
$this->assertTitle("Reported Images");
$this->assertText("report details");
$this->click("Remove Report");
$this->assertTitle("Reported Images");
$this->assertNoText("report details");
$this->delete_image($image_id);
$this->log_out();
}
}
?>

View File

@ -78,7 +78,7 @@ class ReportImageTheme extends Themelet {
$html = "
<form action='".make_link("image_report/add")."' method='POST'>
<input type='hidden' name='image_id' value='$i_image'>
<input type='field' name='reason' value='Please enter a reason' onclick='this.value=\"\";'>
<input type='text' name='reason' value='Please enter a reason' onclick='this.value=\"\";'>
<input type='submit' value='Report'>
</form>
";