Skip to content

Commit 084187e

Browse files
authored
Fix deleteAuthenticationMethodById (#552)
1 parent d9667a5 commit 084187e

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

src/main/java/com/auth0/client/mgmt/UsersEntity.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -732,8 +732,7 @@ public Request<Void> deleteAuthenticationMethodById(String userId, String authen
732732
.build()
733733
.toString();
734734

735-
return new BaseRequest<>(this.client, tokenProvider, url, HttpMethod.DELETE, new TypeReference<Void>() {
736-
});
735+
return new VoidRequest(this.client, tokenProvider, url, HttpMethod.DELETE);
737736
}
738737

739738
/**

src/test/java/com/auth0/client/mgmt/UsersEntityTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,8 +1300,8 @@ public void shouldDeleteUserAuthenticationMethodById() throws Exception {
13001300
Request<Void> request = api.users().deleteAuthenticationMethodById("1", "1");
13011301
assertThat(request, is(notNullValue()));
13021302

1303-
server.jsonResponse(AUTHENTICATOR_METHOD_UPDATE_BY_ID, 200);
1304-
Void response = request.execute().getBody();
1303+
server.noContentResponse();
1304+
request.execute().getBody();
13051305
RecordedRequest recordedRequest = server.takeRequest();
13061306

13071307
assertThat(recordedRequest, hasMethodAndPath(HttpMethod.DELETE, "/api/v2/users/1/authentication-methods/1"));

0 commit comments

Comments
 (0)