Skip to:
Content

BuddyPress.org

Changeset 8331


Ignore:
Timestamp:
04/29/2014 12:36:19 PM (10 years ago)
Author:
boonebgorges
Message:

Remove disable_account_deletion cases from bp_core_delete_account() tests

As of r8324, this settings check takes place in an action controller, not here
in the business level function. See #5575

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0/tests/testcases/members/functions.php

    r8314 r8331  
    1919
    2020    /**
    21      * ticket BP4915
     21     * @ticket BP4915
     22     * @group bp_core_delete_account
    2223     */
    2324    public function test_bp_core_delete_account() {
     
    5354        $maybe_user = new WP_User( $user4 );
    5455        $this->assertNotEquals( 0, $maybe_user->ID );
    55         unset( $maybe_user );
    56 
    57         // User cannot delete own account when account deletion is disabled
    58         $user5 = $this->factory->user->create( array( 'role' => 'subscriber' ) );
    59         $this->set_current_user( $user5 );
    60         bp_update_option( 'bp-disable-account-deletion', 1 );
    61         bp_core_delete_account( $user5 );
    62         $maybe_user = new WP_User( $user5 );
    63         $this->assertNotEquals( 0, $maybe_user->ID );
    64         unset( $maybe_user );
    65 
    66         // User can delete own account when account deletion is enabled
    67         $user6 = $this->factory->user->create( array( 'role' => 'subscriber' ) );
    68         $this->set_current_user( $user6 );
    69         bp_update_option( 'bp-disable-account-deletion', 0 );
    70         bp_core_delete_account( $user6 );
    71         $maybe_user = new WP_User( $user6 );
    72         $this->assertEquals( 0, $maybe_user->ID );
    7356        unset( $maybe_user );
    7457
Note: See TracChangeset for help on using the changeset viewer.