Skip to:
Content

BuddyPress.org

Changeset 10748


Ignore:
Timestamp:
05/12/2016 06:47:49 PM (8 years ago)
Author:
djpaul
Message:

Activity: add test for deleting user when they have no bp_last_activity cache set.

See #6981

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/friends/activity.php

    r10563 r10748  
    219219        $this->assertEmpty( $friendship_activity['activities'] );
    220220    }
     221
     222    public function test_delete_user_with_no_activities() {
     223        $old_user = get_current_user_id();
     224        $u1 = $this->factory->user->create();
     225        $this->set_current_user( $u1 );
     226
     227        bp_activity_remove_all_user_data( $u1 );
     228        wp_cache_delete( $u1, 'bp_last_activity' );
     229        wp_delete_user( $u1 );
     230
     231        $this->set_current_user( $old_user );
     232    }
    221233}
    222234
Note: See TracChangeset for help on using the changeset viewer.