summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2017-12-15 10:23:11 +0000
committerSean McGivern <sean@gitlab.com>2017-12-15 10:23:11 +0000
commit10885edf227bb6de865c73914783f2709ebae177 (patch)
treeabd08be1511d19ad1c67d4e08775c515a90571f2 /app
parent391bb437611b91e2767384ff9852beb573c84996 (diff)
downloadgitlab-ce-ignore-markdown-cache-when-stubbing-application-settings.tar.gz
Don't use Markdown cache for stubbed settings in specsignore-markdown-cache-when-stubbing-application-settings
The ApplicationSetting model uses the CacheMarkdownField concern, which updates the cached HTML when the field is updated in the database. However, in specs, when we want to test conditions using ApplicationSetting, we stub it, because this is accessed in different ways throughout the application. This means that if a spec runs that caches one of the Markdown fields, and a later spec uses `stub_application_setting` to set the raw value of that field, the cached value was still the original one. We can work around this by ignoring the Markdown cache in contexts where we're using `stub_application_setting`. We could be smarter, and only do this on the Markdown fields of the model, but this is probably fine.
Diffstat (limited to 'app')
0 files changed, 0 insertions, 0 deletions