admin tools tests
This commit is contained in:
parent
43533973a7
commit
b39a0d7ede
1 changed files with 51 additions and 2 deletions
|
@ -10,15 +10,64 @@ class AdminPageTest extends ShimmieWebTestCase {
|
|||
$this->assert_response(403);
|
||||
$this->assert_title("Permission Denied");
|
||||
$this->log_out();
|
||||
}
|
||||
|
||||
function testPurge() {
|
||||
$this->log_in_as_admin();
|
||||
$image_id_1 = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "TeSt");
|
||||
|
||||
$this->get_page("post/view/$image_id_1");
|
||||
$this->assert_title("Image $image_id_1: TeSt");
|
||||
|
||||
$this->get_page('admin');
|
||||
$this->assert_title("Admin Tools");
|
||||
$this->set_field("action", "lowercase all tags");
|
||||
$this->click("Go");
|
||||
$this->log_out();
|
||||
|
||||
$this->get_page("post/view/$image_id_1");
|
||||
$this->assert_title("Image $image_id_1: test");
|
||||
|
||||
$this->delete_image($image_id_1);
|
||||
$this->log_out();
|
||||
}
|
||||
|
||||
# FIXME: make sure the admin tools actually work
|
||||
function testRecount() {
|
||||
$this->log_in_as_admin();
|
||||
$this->get_page('admin');
|
||||
$this->assert_title("Admin Tools");
|
||||
$this->set_field("action", "recount tag use");
|
||||
$this->click("Go");
|
||||
$this->log_out();
|
||||
}
|
||||
|
||||
function testPurge() {
|
||||
$this->log_in_as_admin();
|
||||
$this->get_page('admin');
|
||||
$this->assert_title("Admin Tools");
|
||||
$this->set_field("action", "purge unused tags");
|
||||
$this->click("Go");
|
||||
$this->log_out();
|
||||
|
||||
# FIXME: make sure the admin tools actually work
|
||||
}
|
||||
|
||||
function testConvert() {
|
||||
$this->log_in_as_admin();
|
||||
$this->get_page('admin');
|
||||
$this->assert_title("Admin Tools");
|
||||
$this->set_field("action", "convert to inodb");
|
||||
$this->click("Go");
|
||||
$this->log_out();
|
||||
}
|
||||
|
||||
function testDump() {
|
||||
$this->log_in_as_admin();
|
||||
$this->get_page('admin');
|
||||
$this->assert_title("Admin Tools");
|
||||
$this->set_field("action", "database dump");
|
||||
$this->click("Go");
|
||||
$this->log_out();
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
Reference in a new issue