X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fapi%2Fv3%2FMembershipTest.php;h=aa5d0937a20e895b0f81722d0c9924c1fa245864;hb=7cbc050355fcbc0f6f279534ab34381745ca5483;hp=8c0fbdc6a725374c57d1844edd0ff2c99d0b2401;hpb=7db8f995f0071ab94f275023c738195da2804db7;p=civicrm-core.git diff --git a/tests/phpunit/api/v3/MembershipTest.php b/tests/phpunit/api/v3/MembershipTest.php index 8c0fbdc6a7..aa5d0937a2 100644 --- a/tests/phpunit/api/v3/MembershipTest.php +++ b/tests/phpunit/api/v3/MembershipTest.php @@ -580,6 +580,11 @@ class api_v3_MembershipTest extends CiviUnitTestCase { $result = $this->callAPISuccess('membership', 'get', $params); $this->assertEquals(1, $result['count']); + // Delete relationship and assert membership is not inherited + $this->callAPISuccess('relationship', 'delete', array('id' => $relationship1['id'])); + $result = $this->callAPISuccess('membership', 'get', $params); + $this->assertEquals(0, $result['count']); + // Tear down - reverse of creation to be safe $this->contactDelete($memberContactId[2]); $this->contactDelete($memberContactId[1]);