2010-02-18 14:34:44 +00:00
|
|
|
<?php
|
|
|
|
class BlotterTest extends SCoreWebTestCase {
|
2010-02-18 15:58:23 +00:00
|
|
|
function testLogin() {
|
2010-02-18 14:34:44 +00:00
|
|
|
$this->log_in_as_admin();
|
|
|
|
$this->assert_text("Blotter Editor");
|
|
|
|
$this->click("Blotter Editor");
|
|
|
|
$this->log_out();
|
|
|
|
}
|
|
|
|
|
2010-02-18 16:22:10 +00:00
|
|
|
function testDenial() {
|
|
|
|
$this->get_page("blotter/editor");
|
2010-02-18 16:24:31 +00:00
|
|
|
$this->assert_response(403);
|
2010-02-18 16:22:10 +00:00
|
|
|
$this->get_page("blotter/add");
|
2010-02-18 16:24:31 +00:00
|
|
|
$this->assert_response(403);
|
2010-02-18 16:22:10 +00:00
|
|
|
$this->get_page("blotter/remove");
|
2010-02-18 16:24:31 +00:00
|
|
|
$this->assert_response(403);
|
2010-02-18 16:22:10 +00:00
|
|
|
}
|
|
|
|
|
2010-02-18 15:58:23 +00:00
|
|
|
function testAddViewRemove() {
|
2010-02-18 14:34:44 +00:00
|
|
|
$this->log_in_as_admin();
|
2010-02-18 15:58:23 +00:00
|
|
|
|
2010-02-18 14:34:44 +00:00
|
|
|
$this->get_page("blotter/editor");
|
|
|
|
$this->set_field("entry_text", "blotter testing");
|
|
|
|
$this->click("Add");
|
|
|
|
$this->assert_text("blotter testing");
|
2010-02-18 15:58:23 +00:00
|
|
|
|
|
|
|
$this->get_page("blotter");
|
|
|
|
$this->assert_text("blotter testing");
|
|
|
|
|
|
|
|
$this->get_page("blotter/editor");
|
2010-02-18 15:59:04 +00:00
|
|
|
$this->click("Remove");
|
2010-02-18 14:34:44 +00:00
|
|
|
$this->assert_no_text("blotter testing");
|
2010-02-18 15:58:23 +00:00
|
|
|
|
2010-02-18 14:34:44 +00:00
|
|
|
$this->log_out();
|
|
|
|
}
|
|
|
|
}
|
2014-04-25 02:34:45 +00:00
|
|
|
|