File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
src/test/kotlin/com/vonage/client/kt Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -254,7 +254,19 @@ class SubaccountsTest : AbstractTest() {
254
254
}
255
255
256
256
@Test
257
- fun `update subaccount` () {
257
+ fun `update subaccount name only` () {
258
+ mockPatch(
259
+ expectedUrl = existingSubUrl, authType = authType,
260
+ expectedRequestParams = mapOf (" name" to name),
261
+ expectedResponseParams = sampleSubaccountMap
262
+ )
263
+ val invocation = { existingSubaccount.update(name = name) }
264
+ assertEqualsSampleSubaccount(invocation())
265
+ assert401ApiResponseException<SubaccountsResponseException >(existingSubUrl, HttpMethod .PATCH , invocation)
266
+ }
267
+
268
+ @Test
269
+ fun `update subaccount both parameters` () {
258
270
mockPatch(
259
271
expectedUrl = existingSubUrl, authType = authType,
260
272
expectedRequestParams = mapOf (
@@ -264,9 +276,6 @@ class SubaccountsTest : AbstractTest() {
264
276
expectedResponseParams = sampleSubaccountMap
265
277
)
266
278
assertEqualsSampleSubaccount(existingSubaccount.update(name, usePrimary))
267
- assert401ApiResponseException<SubaccountsResponseException >(existingSubUrl, HttpMethod .PATCH ) {
268
- existingSubaccount.update(usePrimaryAccountBalance = usePrimary)
269
- }
270
279
}
271
280
272
281
@Test
You can’t perform that action at this time.
0 commit comments