This repository has been archived on 2024-09-05. You can view files and clone it, but cannot push or open issues or pull requests.
shimmie2/ext/pools/test.php

41 lines
947 B
PHP

<?php
class PoolsTest extends ShimmieWebTestCase {
function testPools() {
$this->get_page('pool/list');
$this->assert_title("Pools");
$this->get_page('pool/new');
$this->assert_title("Error");
$this->log_in_as_user();
$this->get_page('pool/list');
$this->click("Create Pool");
$this->assert_title("Create Pool");
$this->click("Create");
$this->assert_title("Error");
$this->get_page('pool/new');
$this->assert_title("Create Pool");
$this->set_field("title", "Test Pool Title");
$this->set_field("description", "Test pool description");
$this->click("Create");
$this->assert_title("Pool: Test Pool Title");
$this->log_out();
$this->log_in_as_admin();
$this->get_page('pool/list');
$this->click("Test Pool Title");
$this->assert_title("Pool: Test Pool Title");
$this->click("Delete Pool");
$this->assert_title("Pools");
$this->assert_no_text("Test Pool Title");
$this->log_out();
}
}
?>