Skip to content

Commit 0073c76

Browse files
authored
Merge pull request #185 from samuel4x4/patch-3
Fixing Policy PATCH method
2 parents d438fdb + 28e0f14 commit 0073c76

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Identity/v3/Api.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -816,6 +816,7 @@ public function patchPolicy(): array
816816
return [
817817
'method' => 'PATCH',
818818
'path' => 'policies/{id}',
819+
'jsonKey' => 'policy',
819820
'params' => [
820821
'id' => $this->params->idUrl('policy'),
821822
'blob' => $this->params->blob(),

tests/unit/Identity/v3/Models/PolicyTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function test_it_updates()
5757
{
5858
$this->policy->type = 'foo';
5959

60-
$this->setupMock('PATCH', 'policies/POLICY_ID', ['type' => 'foo'], [], 'policy');
60+
$this->setupMock('PATCH', 'policies/POLICY_ID', ['policy' => ['type' => 'foo']], [], 'policy');
6161

6262
$this->policy->update();
6363
}

0 commit comments

Comments
 (0)