Skip to content

Commit

Permalink
ENGCOM-6062: Cover exceptions in \Magento\CustomerGraphQl\Model\Resol…
Browse files Browse the repository at this point in the history
…ver\CreateCustomerAddress #1001
  • Loading branch information
lenaorobei authored Oct 14, 2019
2 parents db40e0b + fc53cf2 commit d03e320
Showing 1 changed file with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,27 @@ public function testCreateCustomerAddressWithMissingAttribute()
$this->graphQlMutation($mutation, [], '', $this->getCustomerAuthHeaders($userName, $password));
}

/**
* @magentoApiDataFixture Magento/Customer/_files/customer_without_addresses.php
* @expectedException Exception
* @expectedExceptionMessage "input" value should be specified
*/
public function testCreateCustomerAddressWithMissingInput()
{
$userName = 'customer@example.com';
$password = 'password';
$mutation = <<<MUTATION
mutation {
createCustomerAddress(
input: {}
) {
city
}
}
MUTATION;
$this->graphQlMutation($mutation, [], '', $this->getCustomerAuthHeaders($userName, $password));
}

/**
* @magentoApiDataFixture Magento/Customer/_files/customer_without_addresses.php
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
Expand Down

0 comments on commit d03e320

Please sign in to comment.