require'rake_helper'describe'gitlab:lfs rake tasks'dodescribe'check'dolet!(:lfs_object){create(:lfs_object,:with_file,:correct_oid)}beforedoRake.application.rake_require('tasks/gitlab/lfs/check')stub_env('VERBOSE'=>'true')endit'outputs the integrity check for each batch'doexpect{run_rake_task('gitlab:lfs:check')}.tooutput(/Failures: 0/).to_stdoutendit'errors out about missing files on the file system'doFileUtils.rm_f(lfs_object.file.path)expect{run_rake_task('gitlab:lfs:check')}.tooutput(/No such file.*#{Regexp.quote(lfs_object.file.path)}/).to_stdoutendit'errors out about invalid checksum'doFile.truncate(lfs_object.file.path,0)expect{run_rake_task('gitlab:lfs:check')}.tooutput(/Checksum mismatch/).to_stdoutendendend