Skip to content

Commit b3789a4

Browse files
author
Oleksandr Karpenko
committed
MAGETWO-53194: Impossible change Tax class for NOT LOGGED IN customer group
1 parent 8004707 commit b3789a4

File tree

1 file changed

+4
-13
lines changed
  • dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml

1 file changed

+4
-13
lines changed

dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/GroupTest.php

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -161,26 +161,17 @@ public function testSaveActionExistingGroup()
161161
);
162162
}
163163

164-
/**
165-
* @magentoDataFixture Magento/Customer/_files/customer_group.php
166-
*/
167-
public function testSaveActionExistingGroupWithEmptyGroupCode()
164+
public function testSaveActionCreateNewGroup()
168165
{
169-
$groupId = $this->findGroupIdWithCode(self::CUSTOMER_GROUP_CODE);
170-
$originalCode = $this->groupRepository->getById($groupId)->getCode();
171-
172166
$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');
175168

176169
$this->dispatch('backend/customer/group/save');
177170

178171
$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
181174
);
182-
$this->assertSessionMessages($this->isEmpty(), MessageInterface::TYPE_SUCCESS);
183-
$this->assertEquals($originalCode, $this->groupRepository->getById($groupId)->getCode());
184175
}
185176

186177
public function testSaveActionForwardNewCreateNewGroup()

0 commit comments

Comments
 (0)