Permalink
Browse files

FLUID-4196: Test case to demonstrate nonexistence of listener merging…

… issue
  • Loading branch information...
1 parent 530dcee commit 6dca782b259137ded78dd56a6a212afd30a7b476 @amb26 amb26 committed Apr 29, 2011
Showing with 25 additions and 0 deletions.
  1. +25 −0 src/webapp/tests/framework-tests/core/js/FluidJSTests.js
View
25 src/webapp/tests/framework-tests/core/js/FluidJSTests.js
@@ -710,6 +710,31 @@ https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt
firer.fire(false); //listener should not run and assertion should not execute
});
+
+ fluid.defaults("fluid.tests.listenerMerging", {
+ gradeNames: ["fluid.eventedComponent", "autoInit"],
+ listeners: {
+ eventOne: function () {},
+ eventTwo: function () {}
+ },
+ events: {
+ eventOne: null,
+ eventTwo: null,
+ eventThree: null
+ }
+ });
+
+ fluidJSTests.test("Listener Merging Tests: FLUID-4196", function() {
+ var threeFired = true;
+ var that = fluid.tests.listenerMerging({
+ listeners: {
+ eventThree: function () {threeFired = true;}
+ }
+ });
+ that.events.eventThree.fire();
+ jqUnit.assertTrue("Event three listener notified", threeFired);
+ });
+
fluid.tests.initLifecycle = function(that) {
that.initted = true;
};

0 comments on commit 6dca782

Please sign in to comment.