2008-10-18 06:40:12 +00:00
|
|
|
<?php
|
2015-09-20 19:44:34 +00:00
|
|
|
class SetupTest extends ShimmiePHPUnitTestCase {
|
|
|
|
function testNiceUrlsTest() {
|
2009-10-09 11:27:13 +00:00
|
|
|
# XXX: this only checks that the text is "ok", to check
|
|
|
|
# for a bug where it was coming out as "\nok"; it doesn't
|
|
|
|
# check that niceurls actually work
|
2015-09-20 19:44:34 +00:00
|
|
|
$this->get_page('nicetest');
|
|
|
|
$this->assert_content("ok");
|
|
|
|
$this->assert_no_content("\n");
|
|
|
|
}
|
2009-10-09 11:27:13 +00:00
|
|
|
|
2015-09-20 19:44:34 +00:00
|
|
|
function testAuthAnon() {
|
|
|
|
$this->get_page('setup');
|
|
|
|
$this->assert_response(403);
|
|
|
|
$this->assert_title("Permission Denied");
|
|
|
|
}
|
|
|
|
|
|
|
|
function testAuthUser() {
|
2009-07-15 01:42:18 +00:00
|
|
|
$this->log_in_as_user();
|
2012-03-09 22:08:55 +00:00
|
|
|
$this->get_page('setup');
|
2009-08-19 00:28:48 +00:00
|
|
|
$this->assert_response(403);
|
|
|
|
$this->assert_title("Permission Denied");
|
2015-09-20 19:44:34 +00:00
|
|
|
}
|
2008-10-18 06:40:12 +00:00
|
|
|
|
2015-09-20 19:44:34 +00:00
|
|
|
function testAuthAdmin() {
|
2009-07-15 01:42:18 +00:00
|
|
|
$this->log_in_as_admin();
|
2012-03-09 22:08:55 +00:00
|
|
|
$this->get_page('setup');
|
2009-08-19 00:28:48 +00:00
|
|
|
$this->assert_title("Shimmie Setup");
|
|
|
|
$this->assert_text("General");
|
2015-09-20 19:44:34 +00:00
|
|
|
}
|
2009-09-27 14:48:38 +00:00
|
|
|
|
2015-09-20 19:44:34 +00:00
|
|
|
function testAdvanced() {
|
|
|
|
$this->log_in_as_admin();
|
2012-03-09 22:08:55 +00:00
|
|
|
$this->get_page('setup/advanced');
|
2009-09-27 14:48:38 +00:00
|
|
|
$this->assert_title("Shimmie Setup");
|
|
|
|
$this->assert_text("thumb_quality");
|
2008-10-18 06:40:12 +00:00
|
|
|
}
|
|
|
|
}
|
2014-04-26 02:54:51 +00:00
|
|
|
|