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

magento/graphql-ce#: deleteCustomerAddress. [Test coverage] Address "id" value should be specified. #1059

Merged
merged 2 commits into from
Nov 14, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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