debian-mirror-gitlab/spec/tasks/cache/clear/redis_spec.rb

20 lines
488 B
Ruby
Raw Normal View History

2018-10-15 14:42:47 +05:30
require 'rake_helper'
describe 'clearing redis cache' do
before do
Rake.application.rake_require 'tasks/cache'
end
describe 'clearing pipeline status cache' do
2019-01-03 12:48:30 +05:30
let(:pipeline_status) { create(:ci_pipeline).project.pipeline_status }
2018-10-15 14:42:47 +05:30
before do
allow(pipeline_status).to receive(:loaded).and_return(nil)
end
it 'clears pipeline status cache' do
expect { run_rake_task('cache:clear:redis') }.to change { pipeline_status.has_cache? }
end
end
end