summaryrefslogtreecommitdiff
path: root/modules/dblog/dblog.test
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-01-08 08:42:13 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-01-08 08:42:13 +0000
commit9a32ca468a320bec9769ed3c29c50b5a1f4459b1 (patch)
tree1986a66b2cdb4ca7df540a19427605ef905e9b8d /modules/dblog/dblog.test
parent1eb5be733ab7df65ffa1713c6c5dbba1558547ff (diff)
downloadbrdo-9a32ca468a320bec9769ed3c29c50b5a1f4459b1.tar.gz
brdo-9a32ca468a320bec9769ed3c29c50b5a1f4459b1.tar.bz2
#8 by sun and most of #drupal: Users can now cancel their accounts. Fixing the 8th issue, almost 8 years later, on January 8th, after working 8 days full-time on it. GREAT WORK :D
Diffstat (limited to 'modules/dblog/dblog.test')
-rw-r--r--modules/dblog/dblog.test11
1 files changed, 7 insertions, 4 deletions
diff --git a/modules/dblog/dblog.test b/modules/dblog/dblog.test
index 902417387..e7b752b1e 100644
--- a/modules/dblog/dblog.test
+++ b/modules/dblog/dblog.test
@@ -165,7 +165,7 @@ class DBLogTestCase extends DrupalWebTestCase {
$this->doNode('page');
$this->doNode('poll');
- // When a user is deleted, any content they created remains but the
+ // When a user account is canceled, any content they created remains but the
// uid = 0. Their blog entry shows as "'s blog" on the home page. Records
// in the watchdog table related to that user have the uid set to zero.
}
@@ -202,8 +202,13 @@ class DBLogTestCase extends DrupalWebTestCase {
}
$count_before = (isset($ids)) ? count($ids) : 0;
$this->assertTrue($count_before > 0, t('DBLog contains @count records for @name', array('@count' => $count_before, '@name' => $user->name)));
+
+ // Login the admin user.
+ $this->drupalLogin($this->big_user);
// Delete user.
- user_delete(array(), $user->uid);
+ // We need to POST here to invoke batch_process() in the internal browser.
+ $this->drupalPost('user/' . $user->uid . '/cancel', array('user_cancel_method' => 'user_cancel_reassign'), t('Cancel account'));
+
// Count rows that have uids for the user.
$count = db_result(db_query('SELECT COUNT(wid) FROM {watchdog} WHERE uid = %d', $user->uid));
$this->assertTrue($count == 0, t('DBLog contains @count records for @name', array('@count' => $count, '@name' => $user->name)));
@@ -225,8 +230,6 @@ class DBLogTestCase extends DrupalWebTestCase {
}
$this->assertTrue(!isset($ids), t('DBLog contains no records for @name', array('@name' => $user->name)));
- // Login the admin user.
- $this->drupalLogin($this->big_user);
// View the dblog report.
$this->drupalGet('admin/reports/dblog');
$this->assertResponse(200);