A ton of tests, figured out how to test uploads \o/

This commit is contained in:
Shish
2009-07-15 02:42:18 +01:00
parent 8dac266af4
commit c88ecebb7b
25 changed files with 250 additions and 153 deletions

21
ext/upload/test.php Normal file
View File

@ -0,0 +1,21 @@
<?php
class UploadTest extends ShimmieWebTestCase {
function testUpload() {
$this->log_in_as_user();
$image_id_1 = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx computer screenshot");
$this->assertResponse(302);
$image_id_2 = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx computer screenshot");
$this->assertTitle("Upload Status");
$this->assertText("already has hash");
$this->log_out();
$this->log_in_as_admin();
$this->delete_image($image_id_1);
$this->delete_image($image_id_2);
$this->log_out();
}
}
?>