             it 'When the cron function is called', (done) ->
                 @timeout 4000
                 Konnector.all (err, body) =>
-                    for konnector in body
-                        if konnector.slug is 'free'
-                            konnector.importInterval = 'day'
-                            konnector.lastAutoImport = moment().format()
-                            konnector.save (err, res, body) =>
-                                poller.start true, () =>
-                                    @spy.callCount.should.equal 0
-                                    done()
+                    for konnector in body when konnector.slug is 'free'
+                        konnector.importInterval = 'day'
+                        konnector.lastAutoImport = moment().format()
+                        konnector.save (err, res, body) =>
+                            poller.start true, () =>
+                                @spy.callCount.should.equal 0
+                                done()
 
             it 'Then the cron function should not have been called after 23 hours', ->
                 @sandbox.clock.tick 23 * hour

            done()
    after (done) ->
        Konnector.all (err, body) =>
            for konnector in body
                if konnector.slug is 'free'
                    konnector.destroy()
                    done()

    describe "Initialize of auto import", ->


                @timeout 8000
                poller.start true, () =>
                    Konnector.all (err, body) =>
                        for konnector in body when konnector.slug is 'free'
                            konnector.importInterval = 'week'
                            konnector.lastAutoImport = moment().format()
                            konnector.fieldValues = {date: moment().add month, 'ms'}
                            poller.handleTimeout konnector, () =>
                                @spy.callCount.should.equal 0
                                done()

            it 'Then the cron function should not have been called after 7 days', (done) ->
                @sandbox.clock.tick 7 * day
