                 lastAutoImport = moment(@body.lastAutoImport)
                 lastAutoImport.format(format).should.equal '01/01/1970'
 
-
             it 'Then the fetch function should have been called after a day', (done) ->
                 @sandbox.clock.tick 1 * day
                 count = 0

                            konnector.destroy()
                            done()


            it 'When the cron function is called', (done) ->
                Konnector.all (err, body) =>
                    for konnector in body when konnector.slug is 'free'
                        konnector.fieldValues = "login": "test", "password": "password", "date": "", 'folderPath': ""

                @timeout 4000
                @sandbox = sinon.sandbox.create useFakeTimers: true
                @spy = @sandbox.spy free, 'fetch'
                Konnector.defineRequest 'all', (doc) ->
                    return emit(doc._id, doc);
                , (err) ->
                    helpers.startApp (appli)->
                        app = appli
                        done()

            after (done) ->
                @sandbox.restore()
                helpers.stopApp () ->
