File tree Expand file tree Collapse file tree 1 file changed +4
-13
lines changed
dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml Expand file tree Collapse file tree 1 file changed +4
-13
lines changed Original file line number Diff line number Diff line change @@ -161,26 +161,17 @@ public function testSaveActionExistingGroup()
161
161
);
162
162
}
163
163
164
- /**
165
- * @magentoDataFixture Magento/Customer/_files/customer_group.php
166
- */
167
- public function testSaveActionExistingGroupWithEmptyGroupCode ()
164
+ public function testSaveActionCreateNewGroup ()
168
165
{
169
- $ groupId = $ this ->findGroupIdWithCode (self ::CUSTOMER_GROUP_CODE );
170
- $ originalCode = $ this ->groupRepository ->getById ($ groupId )->getCode ();
171
-
172
166
$ this ->getRequest ()->setParam ('tax_class ' , self ::TAX_CLASS_ID );
173
- $ this ->getRequest ()->setParam ('id ' , $ groupId );
174
- $ this ->getRequest ()->setParam ('code ' , '' );
167
+ $ this ->getRequest ()->setParam ('code ' , 'group_code ' );
175
168
176
169
$ this ->dispatch ('backend/customer/group/save ' );
177
170
178
171
$ this ->assertSessionMessages (
179
- $ this ->equalTo (['code is a required field . ' ]),
180
- MessageInterface::TYPE_ERROR
172
+ $ this ->equalTo (['You saved the customer group . ' ]),
173
+ MessageInterface::TYPE_SUCCESS
181
174
);
182
- $ this ->assertSessionMessages ($ this ->isEmpty (), MessageInterface::TYPE_SUCCESS );
183
- $ this ->assertEquals ($ originalCode , $ this ->groupRepository ->getById ($ groupId )->getCode ());
184
175
}
185
176
186
177
public function testSaveActionForwardNewCreateNewGroup ()
You can’t perform that action at this time.
0 commit comments