Skip to content

Commit 772f092

Browse files
author
Oleksandr Iegorov
committed
MC-38575: cannot set bundle attributes required_options and has_options creating/updating bundle product via rest api
1 parent e94c9bf commit 772f092

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,6 +1110,20 @@ public function testSaveWithoutTypeOptions()
11101110
$this->assertTrue($this->model->getTypeHasRequiredOptions());
11111111
}
11121112

1113+
/**
1114+
* Test for save method with provided options data
1115+
*/
1116+
public function testSaveWithProvidedRequiredOptions()
1117+
{
1118+
$this->model->setData("has_options", "1");
1119+
$this->model->setData("required_options", "1");
1120+
$this->configureSaveTest();
1121+
$this->model->beforeSave();
1122+
$this->model->afterSave();
1123+
$this->assertTrue($this->model->getHasOptions());
1124+
$this->assertTrue($this->model->getRequiredOptions());
1125+
}
1126+
11131127
public function testGetIsSalableSimple()
11141128
{
11151129
$typeInstanceMock =

0 commit comments

Comments
 (0)