Skip to content

Commit c48fb9c

Browse files
committed
ACP2E-3900: Update product url_key via REST API does not generate a 301 URL Rewrite
- added test coverage
1 parent e5df3f1 commit c48fb9c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,15 @@ public function testSaveForAllStoreViewScope(array $productData): void
384384
return null;
385385
}
386386
});
387+
$this->product
388+
->method('setData')
389+
->willReturnCallback(function ($key, $value) {
390+
if ($key !== 'save_rewrites_history') {
391+
return null;
392+
}
393+
394+
$this->assertEquals(null, $value);
395+
});
387396
$this->model->save($this->product);
388397
}
389398

0 commit comments

Comments
 (0)