Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZ.J. van de Weg <git@zjvandeweg.nl>2017-05-23 11:43:55 +0300
committerZ.J. van de Weg <git@zjvandeweg.nl>2017-05-24 11:02:32 +0300
commit3be9820da63d77ab8b4469dbbb5385292f928057 (patch)
treeaa8317a5e7736183f731ebd85be462efd23a1f82 /spec/models/deployment_spec.rb
parentf0cd6ffd0bec0c8a612a7af6e8a9a0a6fa5d31a4 (diff)
Test etag caching router and incorporate review
Diffstat (limited to 'spec/models/deployment_spec.rb')
-rw-r--r--spec/models/deployment_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/models/deployment_spec.rb b/spec/models/deployment_spec.rb
index 4bda7d4314a..9e8acb3812b 100644
--- a/spec/models/deployment_spec.rb
+++ b/spec/models/deployment_spec.rb
@@ -16,6 +16,14 @@ describe Deployment, models: true do
it { is_expected.to validate_presence_of(:ref) }
it { is_expected.to validate_presence_of(:sha) }
+ describe 'after_create callbacks' do
+ it 'invalidates the cache for the environment' do
+ expect(subject).to receive(:invalidate_cache)
+
+ subject.save!
+ end
+ end
+
describe '#includes_commit?' do
let(:project) { create(:project, :repository) }
let(:environment) { create(:environment, project: project) }