       params = {}
       pollingInterval = 100
 
-      sinon.stub apiService, 'consolidateParams', -> params
+      consolidateParams = sinon.stub apiService, 'consolidateParams', -> params
       fetch = sinon.stub apiService, 'fetch'
 
       apiService.addSubscription


      assert spy.calledOnce

      args = spy.getCall(0).args

      # args are params array, channel name
      assert.equal args.length, 2

    it 'does one-off fetches', ->
      params = {}

      consolidateParams = sinon.stub apiService, 'consolidateParams', -> params
      fetch = sinon.stub apiService, 'fetch'

      apiService.addSubscription
        params: params

      assert windowStub.setTimeout.calledOnce
      args = windowStub.setTimeout.lastCall.args

      assert.equal args.length, 2
      assert.equal args[1], 0
