File tree 2 files changed +5
-1
lines changed
app/code/Magento/Newsletter/Controller/Manage
dev/tests/integration/testsuite/Magento/Newsletter/Controller
2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,9 @@ public function execute()
96
96
->unsubscribeCustomerById ($ customerId );
97
97
$ this ->messageManager ->addSuccess (__ ('We removed the subscription. ' ));
98
98
}
99
+ }else {
100
+ $ this ->messageManager ->addSuccess (__ ('We updated the subscription. ' ));
101
+ return ;
99
102
}
100
103
} catch (\Exception $ e ) {
101
104
$ this ->messageManager ->addError (__ ('Something went wrong while saving your subscription. ' ));
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ public function testSaveAction()
68
68
*/
69
69
public function testSaveActionRemoveSubscription ()
70
70
{
71
+
71
72
$ this ->getRequest ()
72
73
->setParam ('form_key ' , 'formKey ' )
73
74
->setParam ('is_subscribed ' , '0 ' );
@@ -84,7 +85,7 @@ public function testSaveActionRemoveSubscription()
84
85
* Check that success message
85
86
*/
86
87
$ this ->assertSessionMessages (
87
- $ this ->equalTo (['We removed the subscription. ' ]),
88
+ $ this ->equalTo (['We updated the subscription. ' ]),
88
89
\Magento \Framework \Message \MessageInterface::TYPE_SUCCESS
89
90
);
90
91
}
You can’t perform that action at this time.
0 commit comments