Skip to:
Content

BuddyPress.org

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#5744 closed defect (bug) (fixed)

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

Reported by: boonebgorges's profile boonebgorges Owned by: boonebgorges's profile 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
10 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
10 years ago

Nice, thanks.

Note: See TracTickets for help on using tickets.