diff options
author | Z.J. van de Weg <git@zjvandeweg.nl> | 2017-05-22 20:22:50 +0200 |
---|---|---|
committer | Z.J. van de Weg <git@zjvandeweg.nl> | 2017-05-22 22:07:11 +0200 |
commit | 336635f283eab06c561134f2147a3bd1983090e1 (patch) | |
tree | 60f38b54fdba9da80f2eeca5e02e1b112a6bdcc2 /spec/models | |
parent | da0c543e289ffc2be0b91b3257bab6f1d0d5dac3 (diff) | |
download | gitlab-ce-336635f283eab06c561134f2147a3bd1983090e1.tar.gz |
Test the ExpireJobCacheWorker and related changeszj-fix-pipeline-etag
These were untested by the cherry picked commit.
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/commit_status_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/models/commit_status_spec.rb b/spec/models/commit_status_spec.rb index 6947affcc1e..c50b8bf7b13 100644 --- a/spec/models/commit_status_spec.rb +++ b/spec/models/commit_status_spec.rb @@ -36,6 +36,16 @@ describe CommitStatus, :models do it { is_expected.to eq(commit_status.user) } end + describe 'status state machine' do + let!(:commit_status) { create(:commit_status, :running, project: project) } + + it 'invalidates the cache after a transition' do + expect(ExpireJobCacheWorker).to receive(:perform_async).with(commit_status.id) + + commit_status.success! + end + end + describe '#started?' do subject { commit_status.started? } |