Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/03/2014 06:26:26 PM (10 years ago)
Author:
djpaul
Message:

Groups, Unit Tests: a creator_id must be passed to groups_create_group to create a group.

Some of our unit tests were built to assume that they would always run with an authenticated user, but obviously this was incorrect. As a result, Groups were being created with creator_id=0, which was breaking other parts of the codebase, for certain tests.

This change also removes the test_creating_new_group_as_anonymous_user test that I added in r9118 which is now unnecessary.

See r9117, r9118, r9120 for other parts of this fix.
Fixes #5983 and the unit tests. :)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/groups/functions.php

    r9118 r9121  
    1616
    1717        $this->factory->group->create();
    18     }
    19 
    20     public function test_creating_new_group_as_anonymous_user() {
    21         $g = $this->factory->group->create();
    22         $this->assertFalse( $g );
    2318    }
    2419
Note: See TracChangeset for help on using the changeset viewer.