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

Commit

Permalink
#975: [Test coverage] deleteCustomerAddress mutation.
Browse files Browse the repository at this point in the history
  • Loading branch information
atwixfirster committed Nov 13, 2019
1 parent 29cbd2f commit e94edea
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,28 @@ public function testDeleteAnotherCustomerAddress()
$this->graphQlMutation($mutation, [], '', $this->getCustomerAuthHeaders($userName, $password));
}

/**
* @magentoApiDataFixture Magento/Customer/_files/customer.php
* @magentoApiDataFixture Magento/Customer/_files/customer_two_addresses.php
*
* @expectedException Exception
* @expectedExceptionMessage Address "id" value should be specified
*/
public function testDeleteCustomerAddressWithZeroAddressEntityId()
{
$userName = '[email protected]';
$password = 'password';
$addressId = 0;

$mutation
= <<<MUTATION
mutation {
deleteCustomerAddress(id: {$addressId})
}
MUTATION;
$this->graphQlMutation($mutation, [], '', $this->getCustomerAuthHeaders($userName, $password));
}

/**
* @magentoApiDataFixture Magento/Customer/_files/customer.php
* @magentoApiDataFixture Magento/Customer/_files/customer_two_addresses.php
Expand Down

0 comments on commit e94edea

Please sign in to comment.