Skip to content

Commit e94edea

Browse files
committed
magento/graphql-ce#975: [Test coverage] deleteCustomerAddress mutation.
1 parent 29cbd2f commit e94edea

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,28 @@ 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+
227249
/**
228250
* @magentoApiDataFixture Magento/Customer/_files/customer.php
229251
* @magentoApiDataFixture Magento/Customer/_files/customer_two_addresses.php

0 commit comments

Comments
 (0)