add test to ensure unlisten events do not fire

This commit is contained in:
Daniel Freedman
2015-10-06 15:07:30 -07:00
parent 900d82b42f
commit bf2f6941a7

View File

@@ -170,6 +170,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
var fn = el._recallEventHandler(el, 'foo', el, 'missing');
assert.ok(fn, 'should be cached');
});
test('once unlistened, no handler fire', function() {
el.fire('foo');
assert.equal(el._warned.length, 1, 'event should not be handled anymore')
});
});
});
</script>