2009-07-16 20:21:49 +01:00
|
|
|
<?php
|
2009-07-21 07:36:12 +01:00
|
|
|
class NewsTest extends SCoreWebTestCase {
|
2009-07-16 20:21:49 +01:00
|
|
|
function testNews() {
|
|
|
|
$this->log_in_as_admin();
|
|
|
|
|
|
|
|
$this->get_page("setup");
|
2009-08-19 01:28:48 +01:00
|
|
|
$this->set_field("_config_news_text", "kittens");
|
2009-07-16 20:21:49 +01:00
|
|
|
$this->click("Save Settings");
|
|
|
|
|
|
|
|
$this->get_page("post/list");
|
2009-08-19 01:28:48 +01:00
|
|
|
$this->assert_text("Note");
|
|
|
|
$this->assert_text("kittens");
|
2009-07-16 20:21:49 +01:00
|
|
|
|
|
|
|
$this->get_page("setup");
|
2009-08-19 01:28:48 +01:00
|
|
|
$this->set_field("_config_news_text", "");
|
2009-07-16 20:21:49 +01:00
|
|
|
$this->click("Save Settings");
|
|
|
|
|
|
|
|
$this->get_page("post/list");
|
2009-08-19 01:28:48 +01:00
|
|
|
$this->assert_no_text("Note");
|
|
|
|
$this->assert_no_text("kittens");
|
2009-07-16 20:21:49 +01:00
|
|
|
|
|
|
|
$this->log_out();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|