forked from Cavemanon/cavepaintings
A ton of tests, figured out how to test uploads \o/
This commit is contained in:
@@ -1,21 +1,32 @@
|
||||
<?php
|
||||
class RSSImagesTest extends WebTestCase {
|
||||
class RSSImagesTest extends ShimmieWebTestCase {
|
||||
function testImageFeed() {
|
||||
$this->get(TEST_BASE.'/rss/images');
|
||||
$this->log_in_as_user();
|
||||
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx computer screenshot");
|
||||
$this->log_out();
|
||||
|
||||
$this->assertTitle("Upload Status");
|
||||
$this->assertText("already has hash");
|
||||
|
||||
$this->get_page('rss/images');
|
||||
$this->assertMime("application/rss+xml");
|
||||
$this->assertNoText("Exception");
|
||||
|
||||
$this->get(TEST_BASE.'/rss/images/1');
|
||||
$this->get_page('rss/images/1');
|
||||
$this->assertMime("application/rss+xml");
|
||||
$this->assertNoText("Exception");
|
||||
|
||||
$this->get(TEST_BASE.'/rss/images/tagme/1');
|
||||
$this->get_page('rss/images/tagme/1');
|
||||
$this->assertMime("application/rss+xml");
|
||||
$this->assertNoText("Exception");
|
||||
|
||||
$this->get(TEST_BASE.'/rss/images/tagme/2');
|
||||
$this->get_page('rss/images/tagme/2');
|
||||
$this->assertMime("application/rss+xml");
|
||||
$this->assertNoText("Exception");
|
||||
|
||||
$this->log_in_as_admin();
|
||||
$this->delete_image($image_id);
|
||||
$this->log_out();
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user