Created
January 30, 2014 19:38
-
-
Save qmaruf/8717089 to your computer and use it in GitHub Desktop.
jasmine test for unsaved redirection
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
describe("display alert for unsaved publisher content", function(){ | |
it('should display confirm dialog if text exists in status message', function(){ | |
$('#status_message_fake_text').val('Hello world'); | |
spyOn(window, 'confirm'); | |
$(window).trigger('beforeunload') | |
expect(window.confirm).toHaveBeenCalled(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment