Skip to content

Commit

Permalink
GraphQL-388: updateCustomer mutation doesn't update undefined fields
Browse files Browse the repository at this point in the history
  • Loading branch information
naydav committed Mar 7, 2019
1 parent 8af73d8 commit 0b6099a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions app/code/Magento/CustomerGraphQl/etc/schema.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ type Customer @doc(description: "Customer defines the customer name and address
id: Int @doc(description: "The ID assigned to the customer")
is_subscribed: Boolean @doc(description: "Indicates whether the customer is subscribed to the company's newsletter") @resolver(class: "\\Magento\\CustomerGraphQl\\Model\\Resolver\\IsSubscribed")
addresses: [CustomerAddress] @doc(description: "An array containing the customer's shipping and billing addresses")
gender: Int @doc(description: "The customer's gender(Male - 1, Female - 2)")
}

type CustomerAddress @doc(description: "CustomerAddress contains detailed information about a customer's billing and shipping addresses"){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function testChangeWeakPassword()
/**
* @magentoApiDataFixture Magento/Customer/_files/customer.php
* @expectedException \Exception
* @expectedExceptionMessage The password doesn't match this account. Verify the password and try again.
* @expectedExceptionMessage Invalid login or password.
*/
public function testChangePasswordIfPasswordIsInvalid()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function testUpdateCustomer()
taxvat: "{$newTaxVat}"
email: "{$newEmail}"
password: "{$currentPassword}"
gender: "{$newGender}"
gender: {$newGender}
}
) {
customer {
Expand All @@ -82,6 +82,7 @@ public function testUpdateCustomer()
dob
taxvat
email
gender
}
}
}
Expand Down Expand Up @@ -209,7 +210,7 @@ public function testUpdateEmailIfPasswordIsMissed()
/**
* @magentoApiDataFixture Magento/Customer/_files/customer.php
* @expectedException \Exception
* @expectedExceptionMessage The password doesn't match this account. Verify the password and try again.
* @expectedExceptionMessage Invalid login or password.
*/
public function testUpdateEmailIfPasswordIsInvalid()
{
Expand Down

0 comments on commit 0b6099a

Please sign in to comment.