This repository was archived by the owner on Dec 19, 2019. It is now read-only.

Description
Preconditions (*)
- No preconditions
Steps to reproduce (*)
- Navigate to Stores > Settings > Configuration > Customers > Newsletter
- In the General Options set Enabled to No
- Save config and Flush Cache
- Navigate to frontend and verify that footer doesn't contain button subscribe when the user is Guest. (I mean that subscription is disabled completely despite the default config setting Allow Guest Subscription is set to Yes and is visible). Click on "Create the Account" link in the header section and verify that checkbox for subscribing also disappeared.
- Perform query:
mutation {
createCustomer(
input: {
firstname: "John"
lastname: "Lennon"
email: "[email protected]"
is_subscribed: true
}
) {
customer {
email
is_subscribed
}
}
}
Expected result (*)
- Rsponse:
{
"data": {
"createCustomer": {
"customer": {
"email": "[email protected]",
"is_subscribed": false
}
}
}
}
or even
{"errors": [
{
"message": "Some message like\: you cannot subscribe now, please try to subscribe later or call to customer support",
"category": "...", "locations": "...", "path": "..."
}
],
"data": {
"createCustomer": {
"customer": {
"email": "[email protected]",
"is_subscribed": false
}
}
}
}
Actual result (*)
- Response:
{
"data": {
"createCustomer": {
"customer": {
"email": "[email protected]",
"is_subscribed": true
}
}
}
}
#35