Skip to content

Commit a1ec248

Browse files
author
Oleksandr Iegorov
committed
MC-42420: Magento Admin can not add a Simple Product to the Order by SKU after deleting a Customizable Option (SKU with blank spaces)
1 parent ea5e9ed commit a1ec248

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

app/code/Magento/Catalog/Test/Unit/Model/ProductTest.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,6 +1113,21 @@ public function testSaveWithProvidedRequiredOptions()
11131113
$this->assertTrue($this->model->getRequiredOptions());
11141114
}
11151115

1116+
/**
1117+
* Test for save method with provided options settled via magic method
1118+
*/
1119+
public function testSaveWithProvidedRequiredOptionsValue()
1120+
{
1121+
$this->model->setHasOptions("1");
1122+
$this->model->setRequiredOptions("1");
1123+
$this->model->setData("options", null);
1124+
$this->configureSaveTest();
1125+
$this->model->beforeSave();
1126+
$this->model->afterSave();
1127+
$this->assertTrue($this->model->getHasOptions());
1128+
$this->assertTrue($this->model->getRequiredOptions());
1129+
}
1130+
11161131
public function testGetIsSalableSimple()
11171132
{
11181133
$typeInstanceMock =

0 commit comments

Comments
 (0)