Skip to content

Commit

Permalink
[Customer] Rename dob to date_of_birth #911
Browse files Browse the repository at this point in the history
  • Loading branch information
XxXgeoXxX committed Sep 10, 2019
1 parent 90b9c43 commit fa8f566
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions app/code/Magento/CustomerGraphQl/etc/schema.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ input CustomerInput {
lastname: String @doc(description: "The customer's family name")
suffix: String @doc(description: "A value such as Sr., Jr., or III")
email: String @doc(description: "The customer's email address. Required")
dob: String @doc(description: "The customer's date of birth")
dob: @deprecated(reason: "The `dob` is deprecated. Use `date_of_birth` instead.") String @doc(description: "The customer's date of birth")
date_of_birth: String @doc(description: "The customer's date of birth")
taxvat: String @doc(description: "The customer's Tax/VAT number (for corporate customers)")
gender: Int @doc(description: "The customer's gender(Male - 1, Female - 2)")
password: String @doc(description: "The customer's password")
Expand All @@ -87,7 +88,8 @@ type Customer @doc(description: "Customer defines the customer name and address
email: String @doc(description: "The customer's email address. Required")
default_billing: String @doc(description: "The ID assigned to the billing address")
default_shipping: String @doc(description: "The ID assigned to the shipping address")
dob: String @doc(description: "The customer's date of birth")
dob: @deprecated(reason: "The `dob` is deprecated. Use `date_of_birth` instead.") String @doc(description: "The customer's date of birth")
date_of_birth: String @doc(description: "The customer's date of birth")
taxvat: String @doc(description: "The customer's Tax/VAT number (for corporate customers)")
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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function testUpdateCustomer()
middlename: "{$newMiddlename}"
lastname: "{$newLastname}"
suffix: "{$newSuffix}"
dob: "{$newDob}"
date_of_birth: "{$newDob}"
taxvat: "{$newTaxVat}"
email: "{$newEmail}"
password: "{$currentPassword}"
Expand All @@ -82,7 +82,7 @@ public function testUpdateCustomer()
middlename
lastname
suffix
dob
date_of_birth
taxvat
email
gender
Expand All @@ -102,7 +102,7 @@ public function testUpdateCustomer()
$this->assertEquals($newMiddlename, $response['updateCustomer']['customer']['middlename']);
$this->assertEquals($newLastname, $response['updateCustomer']['customer']['lastname']);
$this->assertEquals($newSuffix, $response['updateCustomer']['customer']['suffix']);
$this->assertEquals($newDob, $response['updateCustomer']['customer']['dob']);
$this->assertEquals($newDob, $response['updateCustomer']['customer']['date_of_birth']);
$this->assertEquals($newTaxVat, $response['updateCustomer']['customer']['taxvat']);
$this->assertEquals($newEmail, $response['updateCustomer']['customer']['email']);
$this->assertEquals($newGender, $response['updateCustomer']['customer']['gender']);
Expand Down

0 comments on commit fa8f566

Please sign in to comment.