Skip to content
This repository was archived by the owner on Dec 19, 2019. It is now read-only.

Commit baec752

Browse files
committed
Removed redundant check
1 parent e94edea commit baec752

File tree

2 files changed

+0
-26
lines changed

2 files changed

+0
-26
lines changed

app/code/Magento/CustomerGraphQl/Model/Resolver/DeleteCustomerAddress.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,6 @@ public function resolve(
5858
throw new GraphQlAuthorizationException(__('The current customer isn\'t authorized.'));
5959
}
6060

61-
if (empty($args['id'])) {
62-
throw new GraphQlInputException(__('Address "id" value should be specified'));
63-
}
64-
6561
$address = $this->getCustomerAddress->execute((int)$args['id'], $context->getUserId());
6662
$this->deleteCustomerAddress->execute($address);
6763
return true;

dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/DeleteCustomerAddressTest.php

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -224,28 +224,6 @@ public function testDeleteAnotherCustomerAddress()
224224
$this->graphQlMutation($mutation, [], '', $this->getCustomerAuthHeaders($userName, $password));
225225
}
226226

227-
/**
228-
* @magentoApiDataFixture Magento/Customer/_files/customer.php
229-
* @magentoApiDataFixture Magento/Customer/_files/customer_two_addresses.php
230-
*
231-
* @expectedException Exception
232-
* @expectedExceptionMessage Address "id" value should be specified
233-
*/
234-
public function testDeleteCustomerAddressWithZeroAddressEntityId()
235-
{
236-
$userName = '[email protected]';
237-
$password = 'password';
238-
$addressId = 0;
239-
240-
$mutation
241-
= <<<MUTATION
242-
mutation {
243-
deleteCustomerAddress(id: {$addressId})
244-
}
245-
MUTATION;
246-
$this->graphQlMutation($mutation, [], '', $this->getCustomerAuthHeaders($userName, $password));
247-
}
248-
249227
/**
250228
* @magentoApiDataFixture Magento/Customer/_files/customer.php
251229
* @magentoApiDataFixture Magento/Customer/_files/customer_two_addresses.php

0 commit comments

Comments
 (0)