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/contrib/ipban/test.php

28 lines
656 B
PHP
Raw Normal View History

<?php
class IPBanTest extends ShimmieWebTestCase {
function testIPBan() {
$this->get_page('ip_ban/list');
$this->assertResponse(403);
$this->assertTitle("Permission Denied");
$this->log_in_as_admin();
$this->get_page('ip_ban/list');
$this->assertNoText("42.42.42.42");
$this->setField('ip', '42.42.42.42');
$this->setField('reason', 'unit testing');
$this->setField('end', '1 week');
$this->click("Ban");
2009-01-04 19:18:37 +00:00
$this->assertText("42.42.42.42");
$this->click("Remove"); // FIXME: remove which ban? :S
$this->assertNoText("42.42.42.42");
$this->log_out();
2009-07-20 05:51:36 +00:00
# FIXME: test that the IP is actually banned
}
}
?>