1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-09 10:16:36 +02:00

[feature/soft-delete] Fix some small bugs

To wit: using non-existing constant POST_DELETED in posting.php; first test
post was initially unapproved; soft delete checkbox appeared at post time
Links pointing to the wrong place.

PHPBB3-9657
This commit is contained in:
Josh Woody
2010-07-17 14:34:36 -05:00
committed by Joas Schilling
parent f570558a8d
commit 1ab41f8dc6
8 changed files with 98 additions and 25 deletions

View File

@@ -181,14 +181,19 @@ class phpbb_class_visibility_test extends PHPUnit_Framework_TestCase
$GLOBALS['auth'] = new phpbb_acl_mock_founder;
$sql_data = array();
phpbb_content_visibility::hide_post(4, 111122211, $sql_data);
phpbb_content_visibility::hide_post(4, 111122211, array('topic_replies' => 1), $sql_data);
$this->assertEquals(
array(FORUMS_TABLE => 'forum_posts = forum_posts - 1',
TOPICS_TABLE => 'topic_replies = topic_replies - 1, topic_last_view_time = 111122211',
USERS_TABLE => 'user_posts = user_posts - 1'),
$sql_data);
$sql_data = array();
phpbb_content_visibility::hide_post(4, 111122211, array('topic_replies' => 0), $sql_data);
$this->assertEquals(
array(FORUMS_TABLE => 'forum_posts = forum_posts - 1',
TOPICS_TABLE => 'topic_last_view_time = 111122211',
USERS_TABLE => 'user_posts = user_posts - 1'),
$sql_data);
}
}
//$a = new phpbb_class_visibility_test;
//$a->test_can_soft_delete();