Update $qProvider configuration

The default logic for how rejected promises are handled has changed slightly. This reinstates the previous default behaviour.
This commit is contained in:
Matt-Yorkley
2021-08-02 23:01:28 +01:00
parent d268cc7bb7
commit 5fb782aeba
3 changed files with 10 additions and 6 deletions

View File

@@ -49,9 +49,11 @@ describe "permalinkCtrl", ->
it "does nothing when PermalinkChecker rejects", ->
$scope.availability = "Some Availability"
deferred.reject()
promise = deferred.promise
spyOn(PermalinkChecker, "check").and.returnValue promise
$scope.$apply Enterprise.permalink = "somethingelse" # Change the permalink
try
deferred.reject()
promise = deferred.promise
spyOn(PermalinkChecker, "check").and.returnValue promise
$scope.$apply Enterprise.permalink = "somethingelse" # Change the permalink
expect($scope.availability).toEqual "Some Availability"
expect(Enterprise.permalink).toEqual "somethingelse"