Permalink
Browse files

adding test to check if the removal of unload works now

adding test to check if the removal of unload works now
  • Loading branch information...
1 parent 20533d0 commit 22fb30982fff6e7f00283fe855acd62342b964eb Cristian Carlesso committed Sep 2, 2012
Showing with 10 additions and 0 deletions.
  1. +10 −0 Specs/1.4client/Element/Element.js
@@ -7,6 +7,16 @@ provides: [Element.Event.Specs]
...
*/
describe('Element', function(){
+
+ it('should remove the onunload method', function(){
+ var text;
+ var handler = function(){ text = 'nope'; };
+ window.addEvent('unload', handler);
+ window.removeEvent('unload', handler);
+ window.fireEvent('unload');
+ expect(text).toBe(undefined);
+ });
+
it('should returns an Elements instance on slice / splice / map methods', function(){
var div = new Element('div',{
html:[

0 comments on commit 22fb309

Please sign in to comment.