diff options
Diffstat (limited to 'spec/models/concerns/cache_markdown_field_spec.rb')
-rw-r--r-- | spec/models/concerns/cache_markdown_field_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/models/concerns/cache_markdown_field_spec.rb b/spec/models/concerns/cache_markdown_field_spec.rb index d46f22b2216..a00129b3fdf 100644 --- a/spec/models/concerns/cache_markdown_field_spec.rb +++ b/spec/models/concerns/cache_markdown_field_spec.rb @@ -404,6 +404,16 @@ RSpec.describe CacheMarkdownField, :clean_gitlab_redis_cache do it 'returns false when there are no changes' do expect(thing.attribute_invalidated?(:description_html)).to eq(false) end + + it 'returns false if skip_markdown_cache_validation is true' do + # invalidates the attribute + thing.cached_markdown_version += 1 + thing.description = updated_markdown + + thing.skip_markdown_cache_validation = true + + expect(thing.attribute_invalidated?(:description_html)).to eq(false) + end end context 'when cache version is updated' do |