From 7236a11db6a1f22f159788447e3fa4fe4ec92b56 Mon Sep 17 00:00:00 2001 From: Phong Nguyen Date: Mon, 20 Jun 2022 06:07:25 +0700 Subject: [PATCH] FIX: delete_organizations_members does not send `members` in body --- lib/auth0/api/v2/organizations.rb | 2 +- spec/lib/auth0/api/v2/organizations_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/auth0/api/v2/organizations.rb b/lib/auth0/api/v2/organizations.rb index f2040677..7d8e8452 100644 --- a/lib/auth0/api/v2/organizations.rb +++ b/lib/auth0/api/v2/organizations.rb @@ -267,7 +267,7 @@ def delete_organizations_members(organization_id, members = []) body = {} body[:members] = members - delete(path, body) + delete_with_body(path, body) end alias remove_organizations_members delete_organizations_members diff --git a/spec/lib/auth0/api/v2/organizations_spec.rb b/spec/lib/auth0/api/v2/organizations_spec.rb index 69ab045b..7c43ad37 100644 --- a/spec/lib/auth0/api/v2/organizations_spec.rb +++ b/spec/lib/auth0/api/v2/organizations_spec.rb @@ -514,7 +514,7 @@ end it 'is expected to delete /api/v2/organizations/org_id/members' do - expect(@instance).to receive(:delete).with( + expect(@instance).to receive(:delete_with_body).with( '/api/v2/organizations/org_id/members', { members: ['123', '456'] }