diff options
author | Nick Thomas <nick@gitlab.com> | 2016-10-07 00:17:11 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2016-10-07 04:54:25 +0300 |
commit | e94cd6fdfe43d9128d37a539cf84f4388c5cf970 (patch) | |
tree | 333c35b6a4483ee0e6b2668486a8f8c81091aa90 /spec/factories | |
parent | 4a90e25f0308515bc4f240e82854a364aea47046 (diff) |
Add markdown cache columns to the database, but don't use them yet
This commit adds a number of _html columns and, with the exception of Note,
starts updating them whenever the content of their partner fields changes.
Note has a collision with the note_html attr_accessor; that will be fixed later
A background worker for clearing these cache columns is also introduced - use
`rake cache:clear` to set it off. You can clear the database or Redis caches
separately by running `rake cache:clear:db` or `rake cache:clear:redis`,
respectively.
Diffstat (limited to 'spec/factories')
-rw-r--r-- | spec/factories/projects.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/factories/projects.rb b/spec/factories/projects.rb index 873d3fcb5af..331172445e4 100644 --- a/spec/factories/projects.rb +++ b/spec/factories/projects.rb @@ -9,6 +9,9 @@ FactoryGirl.define do namespace creator + # Behaves differently to nil due to cache_has_external_issue_tracker + has_external_issue_tracker false + trait :public do visibility_level Gitlab::VisibilityLevel::PUBLIC end @@ -92,6 +95,8 @@ FactoryGirl.define do end factory :redmine_project, parent: :project do + has_external_issue_tracker true + after :create do |project| project.create_redmine_service( active: true, @@ -105,6 +110,8 @@ FactoryGirl.define do end factory :jira_project, parent: :project do + has_external_issue_tracker true + after :create do |project| project.create_jira_service( active: true, |