From d79e226a20e3666b03b1d61900b1d035afd29978 Mon Sep 17 00:00:00 2001 From: Alasdair Smith Date: Mon, 26 Feb 2018 10:58:20 +0000 Subject: [PATCH] Fix callback defined in wrong describe block scope --- .../coffee/References/ReferencesControllerTests.coffee | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/services/web/test/unit/coffee/References/ReferencesControllerTests.coffee b/services/web/test/unit/coffee/References/ReferencesControllerTests.coffee index 37a448d34a..7af553d5ec 100644 --- a/services/web/test/unit/coffee/References/ReferencesControllerTests.coffee +++ b/services/web/test/unit/coffee/References/ReferencesControllerTests.coffee @@ -142,13 +142,15 @@ describe "ReferencesController", -> describe 'index', -> + beforeEach -> + @call = (callback) => + @controller.index @req, @res + callback() + describe 'with docIds as an array and shouldBroadcast as false', -> beforeEach -> @ReferencesHandler.index.callsArgWith(2, null, @fakeResponseData) - @call = (callback) => - @controller.index @req, @res - callback() it 'should call ReferencesHandler.index', (done) -> @call () =>