Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/27/2014 05:37:41 PM (12 years ago)
Author:
boonebgorges
Message:

Fix check for existing friendship in friends_add_friend()

The previous logic would always result in this check failing.

Fixes #5319

Props r-a-y

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/testcases/friends/functions.php

    r8172 r8173  
    124124        $this->assertFalse( friends_add_friend( $u1, $u1 ) );
    125125    }
     126
     127    /**
     128     * @group friends_add_friend
     129     */
     130    public function test_friends_add_friend_already_friends() {
     131        $u1 = $this->create_user();
     132        $u2 = $this->create_user();
     133
     134        friends_add_friend( $u1, $u2, true );
     135
     136        $this->assertTrue( friends_add_friend( $u1, $u2 ) );
     137    }
    126138}
Note: See TracChangeset for help on using the changeset viewer.