Skip to content

Instantly share code, notes, and snippets.

@robbieferrero
Created June 29, 2013 18:55
Show Gist options
  • Save robbieferrero/5892231 to your computer and use it in GitHub Desktop.
Save robbieferrero/5892231 to your computer and use it in GitHub Desktop.
record deletion test
it('should notify Record Deleted on deletion', function() {
spyOn(UserNotification, 'notifyShort');
spyOn(Utility, 'prompt').andReturn(resolveDummyPromiseAsync());
var task = new Task({
id: '1',
activitydate: moment().add('months', 1).format("YYYY-MM-DD")
});
var test = ListHelper.editFormFor(task, 'Test Deletion');
var form = $('#modal-edit-form');
form.find('.delete-object').trigger('vclick');
expect(UserNotification.notifyShort).toHaveBeenCalled();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment