diff options
Diffstat (limited to 'spec/models/note_spec.rb')
-rw-r--r-- | spec/models/note_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/models/note_spec.rb b/spec/models/note_spec.rb index 6a6c71e6c82..a2cb716cb93 100644 --- a/spec/models/note_spec.rb +++ b/spec/models/note_spec.rb @@ -828,5 +828,15 @@ describe Note do note.destroy! end + + context 'when issuable etag caching is disabled' do + it 'does not store cache key' do + allow(note.noteable).to receive(:etag_caching_enabled?).and_return(false) + + expect_any_instance_of(Gitlab::EtagCaching::Store).not_to receive(:touch) + + note.save! + end + end end end |