Skip to content

Commit 705e6da

Browse files
authored
Merge pull request #120 from samuel4x4/patch-1
Allow postService() method to set description property
2 parents 59802cb + 97900a5 commit 705e6da

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

src/Identity/v3/Api.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public function postServices(): array
6161
'params' => [
6262
'name' => $this->params->name('service'),
6363
'type' => $this->params->type('service'),
64+
'description' => $this->params->desc('service'),
6465
]
6566
];
6667
}

tests/integration/Identity/v3/CoreTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public function domains()
147147

148148
public function endpoints()
149149
{
150-
$service = $this->getService()->createService(['name' => $this->randomStr(), 'type' => 'volume']);
150+
$service = $this->getService()->createService(['name' => $this->randomStr(), 'type' => 'volume', 'description' => $this->randomStr()]);
151151

152152
$replacements = [
153153
'{endpointName}' => $this->randomStr(),

tests/unit/Identity/v3/Fixtures/service.resp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Content-Type: application/json
55
"service": {
66
"id": "serviceId",
77
"name": "foo",
8-
"type": "bar"
8+
"type": "bar",
9+
"description": "description"
910
}
10-
}
11+
}

tests/unit/Identity/v3/ServiceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public function test_it_revokes_token()
157157

158158
public function test_it_creates_service()
159159
{
160-
$userOptions = ['name' => 'foo', 'type' => 'bar'];
160+
$userOptions = ['name' => 'foo', 'type' => 'bar', 'description' => 'description'];
161161

162162
$this->setupMock('POST', 'services', ['service' => $userOptions], [], 'service');
163163

0 commit comments

Comments
 (0)