a load more tests
This commit is contained in:
23
contrib/report_image/test.php
Normal file
23
contrib/report_image/test.php
Normal 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();
|
||||
}
|
||||
}
|
||||
?>
|
@ -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>
|
||||
";
|
||||
|
Reference in New Issue
Block a user