Skip to content

Commit

Permalink
magento/graphql-ce#271: [My Account] Add support of Customer attributes
Browse files Browse the repository at this point in the history
- Updating API functional test: adding
  • Loading branch information
furseyev committed Mar 16, 2019
1 parent dba9800 commit 7f6718d
Showing 1 changed file with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,34 @@ public function testUpdateEmailIfEmailAlreadyExists()
$this->graphQlQuery($query, [], '', $this->getCustomerAuthHeaders($currentEmail, $currentPassword));
}

/**
* @magentoApiDataFixture Magento/Customer/_files/customer.php
* @expectedException \Exception
* @expectedExceptionMessage Required parameters are missing: firstname
*/
public function testEmptyCustomerName()
{
$currentEmail = '[email protected]';
$currentPassword = 'password';

$query = <<<QUERY
mutation {
updateCustomer(
input: {
email: "{$currentEmail}"
password: "{$currentPassword}"
firstname: ""
}
) {
customer {
email
}
}
}
QUERY;
$this->graphQlQuery($query, [], '', $this->getCustomerAuthHeaders($currentEmail, $currentPassword));
}

/**
* @param string $email
* @param string $password
Expand Down

0 comments on commit 7f6718d

Please sign in to comment.