Add confirm dialog for enterprise image removal

This commit is contained in:
Kristina Lim
2018-07-30 08:39:37 +08:00
parent 368612cad6
commit ce0758d420
3 changed files with 8 additions and 0 deletions

View File

@@ -42,6 +42,7 @@ describe "enterpriseCtrl", ->
beforeEach inject ($q) ->
spyOn(scope, "$emit")
deferred = $q.defer()
spyOn(window, "confirm").and.returnValue(true)
spyOn(Enterprises, "removeLogo").and.returnValue(deferred.promise)
spyOn(StatusMessage, "display").and.callThrough()
scope.removeLogo()
@@ -74,6 +75,7 @@ describe "enterpriseCtrl", ->
beforeEach inject ($q) ->
spyOn(scope, "$emit")
deferred = $q.defer()
spyOn(window, "confirm").and.returnValue(true)
spyOn(Enterprises, "removePromoImage").and.returnValue(deferred.promise)
spyOn(StatusMessage, "display").and.callThrough()
scope.removePromoImage()