From 081432cec3d3a11388046ffc7ea1dd661172ed27 Mon Sep 17 00:00:00 2001 From: Chris Thoburn Date: Thu, 4 Apr 2019 11:50:41 -0700 Subject: [PATCH] [FIX ManyArray] Evented.off requires a reference to the original callback --- tests/integration/relationships/has-many-test.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/integration/relationships/has-many-test.js b/tests/integration/relationships/has-many-test.js index 052a0cf923a..c42b059cd98 100644 --- a/tests/integration/relationships/has-many-test.js +++ b/tests/integration/relationships/has-many-test.js @@ -1311,12 +1311,12 @@ test('PromiseArray proxies evented methods to its ManyArray', function(assert) { }); assert.equal(comments.has('on-event'), true); + const cb = function() { + assert.ok(false, 'We should not trigger this event'); + }; - comments.on('off-event', function() { - assert.ok(false); - }); - - comments.off('off-event'); + comments.on('off-event', cb); + comments.off('off-event', cb); assert.equal(comments.has('off-event'), false);