35 lines
1010 B
PHP
Raw Normal View History

2012-03-10 17:40:11 +00:00
<?php
class HashBanTest extends ShimmiePHPUnitTestCase
{
public function testBan()
{
$this->log_in_as_user();
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "pbx");
$this->log_out();
2012-03-10 17:40:11 +00:00
$this->log_in_as_admin();
$this->get_page("post/view/$image_id");
2015-09-20 22:40:04 +01:00
$this->markTestIncomplete();
2015-09-20 22:40:04 +01:00
$this->click("Ban and Delete");
$this->log_out();
2012-03-10 17:40:11 +00:00
$this->log_in_as_user();
$this->get_page("post/view/$image_id");
$this->assert_response(404);
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "pbx");
$this->get_page("post/view/$image_id");
$this->assert_response(404);
2012-03-10 17:51:56 +00:00
$this->log_in_as_admin();
$this->get_page("image_hash_ban/list/1");
$this->click("Remove");
2012-03-10 17:51:56 +00:00
$this->log_in_as_user();
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "pbx");
$this->get_page("post/view/$image_id");
$this->assert_response(200);
}
2012-03-10 17:40:11 +00:00
}