summaryrefslogtreecommitdiff
path: root/spec/factories
diff options
context:
space:
mode:
authorOswaldo Ferreira <oswaldo@gitlab.com>2018-10-23 09:49:45 +0000
committerPhil Hughes <me@iamphill.com>2018-10-23 09:49:45 +0000
commit86ead874e217fb1aceb2d09daf29a9a6ade0ff62 (patch)
tree16d7130d8b4ce09bff582e4506ca191253a2895c /spec/factories
parent10bb8297ebe5fc01540b20c3fd365234779b6837 (diff)
downloadgitlab-ce-86ead874e217fb1aceb2d09daf29a9a6ade0ff62.tar.gz
Resolve "Filter discussion (tab) by comments or activity in issues and merge requests"
Diffstat (limited to 'spec/factories')
-rw-r--r--spec/factories/user_preferences.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/factories/user_preferences.rb b/spec/factories/user_preferences.rb
new file mode 100644
index 00000000000..19059a93625
--- /dev/null
+++ b/spec/factories/user_preferences.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+FactoryBot.define do
+ factory :user_preference do
+ user
+
+ trait :only_comments do
+ issue_notes_filter { UserPreference::NOTES_FILTERS[:only_comments] }
+ merge_request_notes_filter { UserPreference::NOTE_FILTERS[:only_comments] }
+ end
+ end
+end