summaryrefslogtreecommitdiff
path: root/spec/models/note_spec.rb
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-03-06 15:11:28 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-03-06 15:11:28 +0100
commit07539ab2b07bf2d1e652a34dcabc7cf907cd9906 (patch)
tree8ba023eb648d009467415fb910ad53c61a2b4b34 /spec/models/note_spec.rb
parentb7d74401854198c7395d7d2c4ef76d9ef56f6d5f (diff)
parent348dff0a826c45f00f992e761423a22d2ac32bc3 (diff)
downloadgitlab-ce-pipeline-blocking-actions.tar.gz
Merge branch 'master' into pipeline-blocking-actionspipeline-blocking-actions
* master: (26 commits) Fix UserBasic Rename `/take` to `/take_ownership`, expose `owner` in `v3`. Update after review Fix values being called at Array instead of Hash Fix json response in branches controller Improve docs and specs related to pages artifacts Add MR fo changelog about removing pages artifacts Delete artifacts for pages unless expiry date is specified Lint doc Improved team selection Move foreign key to separate migration Fix import model attributes Update documentation and expose ID Introduce tests for pipeline triggers Fix trigger model Update db/schema Make triggers to be user aware Make Pipeline Triggers to be user aware Update triggers API Remove remnants of git annex ... Conflicts: db/schema.rb
Diffstat (limited to 'spec/models/note_spec.rb')
-rw-r--r--spec/models/note_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/models/note_spec.rb b/spec/models/note_spec.rb
index 1cde9e04951..33536487c41 100644
--- a/spec/models/note_spec.rb
+++ b/spec/models/note_spec.rb
@@ -387,4 +387,16 @@ describe Note, models: true do
end
end
end
+
+ describe 'expiring ETag cache' do
+ let(:note) { build(:note_on_issue) }
+
+ it "expires cache for note's issue when note is saved" do
+ expect_any_instance_of(Gitlab::EtagCaching::Store)
+ .to receive(:touch)
+ .with("/#{note.project.namespace.to_param}/#{note.project.to_param}/noteable/issue/#{note.noteable.id}/notes")
+
+ note.save!
+ end
+ end
end