Ejemplo n.º 1
0
        public void ProductSpecificationAttributeOptionController_DeletePOST_CallsDeleteOption()
        {
            var controller = GetProductSpecificationAttributeOptionController();
            var attribute  = new ProductSpecificationAttribute();
            var option     = new ProductSpecificationAttributeOption()
            {
                ProductSpecificationAttribute = attribute
            };

            var delete = controller.Delete_POST(option);

            A.CallTo(() => _productOptionManager.DeleteSpecificationAttributeOption(option)).MustHaveHappened();
        }
 public RedirectToRouteResult Delete_POST(ProductSpecificationAttributeOption option)
 {
     _productOptionManager.DeleteSpecificationAttributeOption(option);
     return(RedirectToAction("Index", new { attributeId = option.ProductSpecificationAttribute.Id }));
 }