Skip to content

Commit

Permalink
when delete a profile, delete associations as well
Browse files Browse the repository at this point in the history
  • Loading branch information
Maria Farooq committed Jan 24, 2018
1 parent 4afa2a1 commit 8f902dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Expand Up @@ -209,6 +209,7 @@ public Response deleteProfile(String profileSid) {
checkProfileExists(profileSid);
checkDefaultProfile(profileSid);
profilesDao.deleteProfile(profileSid);
profileAssociationsDao.deleteProfileAssociationByProfileSid(profileSid);
return Response.ok().build();
}

Expand Down
Expand Up @@ -195,7 +195,7 @@ public void createProfileTestInvalidSchema(){
@Category(FeatureExpTests.class)
public void updateProfileUnknownSidTest(){
/*
* update a profile
* update a profile with unknown sid
*/
ClientResponse clientResponse = RestcommProfilesTool.getInstance().updateProfileResponse(deploymentUrl.toString(), SUPER_ADMIN_ACCOUNT_SID, AUTH_TOKEN, UNKNOWN_PROFILE_SID, UPDATE_PROFILE_DOCUMENT);
assertEquals(404, clientResponse.getStatus());
Expand Down

0 comments on commit 8f902dc

Please sign in to comment.