Created
September 26, 2014 16:00
-
-
Save simonmorley/fd04974b7a9a4fb7042a to your computer and use it in GitHub Desktop.
Miserable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it("should call CT's api and enable alerts for a box", function() { | |
expect($scope.box.is_monitored).toBe(false) | |
spyOn(boxFactory, 'alerts').andCallThrough() | |
var cont = element.find('input').controller('ngModel'); | |
cont.$setViewValue(true); | |
deferred.resolve({slug: 123, is_monitored: true}); | |
$scope.$apply() | |
expect($scope.status.processing).toBe(true) | |
expect(boxFactory.alerts).toHaveBeenCalled(); | |
expect($scope.box.is_monitored).toBe(true) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment