Skip to content

Commit 7f6718d

Browse files
committed
magento/graphql-ce#271: [My Account] Add support of Customer attributes
- Updating API functional test: adding
1 parent dba9800 commit 7f6718d

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

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

+28
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,34 @@ public function testUpdateEmailIfEmailAlreadyExists()
263263
$this->graphQlQuery($query, [], '', $this->getCustomerAuthHeaders($currentEmail, $currentPassword));
264264
}
265265

266+
/**
267+
* @magentoApiDataFixture Magento/Customer/_files/customer.php
268+
* @expectedException \Exception
269+
* @expectedExceptionMessage Required parameters are missing: firstname
270+
*/
271+
public function testEmptyCustomerName()
272+
{
273+
$currentEmail = '[email protected]';
274+
$currentPassword = 'password';
275+
276+
$query = <<<QUERY
277+
mutation {
278+
updateCustomer(
279+
input: {
280+
email: "{$currentEmail}"
281+
password: "{$currentPassword}"
282+
firstname: ""
283+
}
284+
) {
285+
customer {
286+
email
287+
}
288+
}
289+
}
290+
QUERY;
291+
$this->graphQlQuery($query, [], '', $this->getCustomerAuthHeaders($currentEmail, $currentPassword));
292+
}
293+
266294
/**
267295
* @param string $email
268296
* @param string $password

0 commit comments

Comments
 (0)