Skip to:
Content

BuddyPress.org

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#5744 closed defect (bug) (fixed)

Multisite suggestions tests should not use 'admin' as current_user username

Reported by: boonebgorges Owned by: boonebgorges
Milestone: 2.1 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords:
Cc:

Description

There's a quirk in the core multisite unit test suite such that when you run create_user() with the username 'admin', that user becomes a super admin on the network; as such, the user has the 'bp_moderate' cap, and is able to get suggestions for all members. This breaks some of the suggestions unit tests, which assume that the logged-in user will not have access to the members of certain groups.

Solution appears to be to use a different username than 'admin' for the user that the tests are run as.

Change History (2)

#1 @boonebgorges
5 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 8562:

Don't use 'admin' as the username of the user when running suggestions tests

On multisite, this user is granted super admin privileges, which breaks some of
the tests.

Fixes #5744

#2 @DJPaul
5 years ago

Nice, thanks.

Note: See TracTickets for help on using tickets.