Merge branch 'master' of ssh://shish@marigold.shishnet.org/git/shimmie2

This commit is contained in:
Shish 2009-10-08 02:44:03 +01:00
commit 0d5b2ecab1
6 changed files with 28 additions and 3 deletions

View File

@ -3,7 +3,7 @@ class BanWordsTest extends ShimmieWebTestCase {
function testWordBan() {
$this->log_in_as_admin();
$this->get_page("setup");
$this->set_field("_config_banned_words", "viagra\nporn\n/http:.*\.cn\//");
$this->set_field("_config_banned_words", "viagra\nporn\n\n/http:.*\.cn\//");
$this->click("Save Settings");
$this->log_out();
@ -21,7 +21,7 @@ class BanWordsTest extends ShimmieWebTestCase {
$this->assert_title("Comment Blocked");
$this->get_page("post/view/$image_id");
$this->set_field('comment', "kittens\n\n\n\nand viagra!");
$this->set_field('comment', "kittens and viagra!");
$this->click("Post Comment");
$this->assert_title("Comment Blocked");

View File

@ -6,6 +6,8 @@ class IcoHandlerTest extends ShimmieWebTestCase {
$this->assert_response(302);
$this->log_out();
$raw = $this->get_page("get_ico/$image_id"); // test for no crash
$this->log_in_as_admin();
$this->delete_image($image_id);
$this->log_out();

View File

@ -17,10 +17,13 @@ class SVGHandlerTest extends ShimmieWebTestCase {
</svg>');
$this->log_in_as_user();
$image_id = $this->post_image("favicon.ico", "shimmie favicon");
$image_id = $this->post_image("test.svg", "something");
$this->assert_response(302);
$this->log_out();
$raw = $this->get_page("get_svg/$image_id");
$this->assertTrue(strpos($raw, "www.w3.org") > 0);
$this->log_in_as_admin();
$this->delete_image($image_id);
$this->log_out();

View File

@ -18,6 +18,8 @@ class IPBanTest extends SCoreWebTestCase {
$this->click("Remove"); // FIXME: remove which ban? :S
$this->assert_no_text("42.42.42.42");
$this->get_page('ip_ban/list?all=on'); // just test it doesn't crash for now
$this->log_out();
# FIXME: test that the IP is actually banned

View File

@ -9,9 +9,23 @@ class ReportImageTest extends ShimmieWebTestCase {
$this->log_out();
$this->log_in_as_admin();
$this->get_page("setup");
$this->set_field("_config_report_image_show_thumbs", true);
$this->click("Save Settings");
$this->get_page("image_report/list");
$this->assert_title("Reported Images");
$this->assert_text("report details");
$this->get_page("setup");
$this->set_field("_config_report_image_show_thumbs", false);
$this->click("Save Settings");
$this->get_page("image_report/list");
$this->assert_title("Reported Images");
$this->assert_text("report details");
$this->assert_text("$image_id");
$this->get_page("image_report/list");
$this->click("Remove Report");
$this->assert_title("Reported Images");
$this->assert_no_text("report details");

View File

@ -15,6 +15,10 @@ class SetupTest extends SCoreWebTestCase {
$this->get_page('setup');
$this->assert_title("Shimmie Setup");
$this->assert_text("General");
$this->get_page('setup/advanced');
$this->assert_title("Shimmie Setup");
$this->assert_text("thumb_quality");
$this->log_out();
}
}