blob: 94f2352a7d67a11fb38053a208085e1a88e6e93b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
require 'spec_helper'
describe Ci::ExpirePipelineCacheService, services: true do
let(:project) { pipeline.project }
let(:pipeline) { create(:ci_pipeline) }
before do
stub_ci_pipeline_to_return_yaml_file
end
subject { described_class.new(project, nil).execute(pipeline) }
describe '#execute' do
it 'creates a new Store' do
expect(Gitlab::EtagCaching::Store).to receive(:new)
.and_call_original
subject
end
it 'updates the ProjectPipelineStatus cache' do
expect(Gitlab::Cache::Ci::ProjectPipelineStatus)
.to receive(:update_for_pipeline).with(pipeline)
subject
end
end
end
|