summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
authorBrett Walker <bwalker@gitlab.com>2019-01-23 15:58:46 -0600
committerFatih Acet <acetfatih@gmail.com>2019-01-30 23:18:17 +0100
commit968e35a692b94ad0fe3bc8be03f64b5e8fec30c0 (patch)
tree3e65dbd0519f8a220ce368f94b4079fefb13e41b /spec/models
parent1fabeecf85cc637fd68ca99a4de7bf3cb3b915bc (diff)
downloadgitlab-ce-968e35a692b94ad0fe3bc8be03f64b5e8fec30c0.tar.gz
Specs for caching and issue controller changes
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/concerns/cache_markdown_field_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/models/concerns/cache_markdown_field_spec.rb b/spec/models/concerns/cache_markdown_field_spec.rb
index ef6af232999..a8a5521a5fc 100644
--- a/spec/models/concerns/cache_markdown_field_spec.rb
+++ b/spec/models/concerns/cache_markdown_field_spec.rb
@@ -133,6 +133,15 @@ describe CacheMarkdownField do
end
end
+ context 'when a markdown field and html field are both set' do
+ it do
+ expect(thing).not_to receive(:refresh_markdown_cache)
+ thing.foo = '_look over there!_'
+ thing.foo_html = '<em>look over there!</em>'
+ thing.save
+ end
+ end
+
context 'a non-markdown field changed' do
shared_examples 'with cache version' do |cache_version|
let(:thing) { ThingWithMarkdownFields.new(foo: markdown, foo_html: html, cached_markdown_version: cache_version) }