asserted the confirmation msg in test

This commit is contained in:
SuprajaR
2022-01-04 00:10:38 +05:30
parent f3f7fba855
commit f9a1b17709

View File

@@ -822,6 +822,7 @@ describe "AdminProductEditCtrl", ->
$scope.dirtyProducts = {}
$httpBackend.expectDELETE("/api/v0/products/13").respond 200, "data"
$scope.deleteProduct $scope.products[1]
expect(window.confirm).toHaveBeenCalledWith "Are you sure?"
$httpBackend.flush()
it "removes the specified product from both $scope.products and $scope.dirtyProducts (if it exists there)", ->