Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-02-17 20:20:35 +0300
committerRémy Coutable <remy@rymai.me>2016-02-18 14:58:31 +0300
commit7dddd45ebfcfe292aadadd57a027dd32810c2005 (patch)
tree15c84c2bf64123d92d67e0bf1763b73dbebe8f3e /spec
parent2e3c35711cc9ef47350f7b2df751a76798271d20 (diff)
Merge branch 'see-and-sort-on-vote-count-mr-issues' into 'master'
Add ability to see and sort on vote count from Issues and MR lists Fixes #3763 * Sort options ![Sort Options](/uploads/df6543d574d4df8bf7e4496a876e2930/sort.png) * Most popular ![Most popular](/uploads/bb92cc2fbef7b6b806dcdf8c52778fdd/most-popular.png) * Least popular ![Least popular](/uploads/7988ed451922c81dc228419b5edbd7cd/least-popular.png) See merge request !2781
Diffstat (limited to 'spec')
-rw-r--r--spec/factories/notes.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/factories/notes.rb b/spec/factories/notes.rb
index 35a20adeef3..32c202891d8 100644
--- a/spec/factories/notes.rb
+++ b/spec/factories/notes.rb
@@ -34,6 +34,8 @@ FactoryGirl.define do
factory :note_on_merge_request_diff, traits: [:on_merge_request, :on_diff]
factory :note_on_project_snippet, traits: [:on_project_snippet]
factory :system_note, traits: [:system]
+ factory :downvote_note, traits: [:award, :downvote]
+ factory :upvote_note, traits: [:award, :upvote]
trait :on_commit do
project
@@ -65,6 +67,18 @@ FactoryGirl.define do
system true
end
+ trait :award do
+ is_award true
+ end
+
+ trait :downvote do
+ note "thumbsdown"
+ end
+
+ trait :upvote do
+ note "thumbsup"
+ end
+
trait :with_attachment do
attachment { fixture_file_upload(Rails.root + "spec/fixtures/dk.png", "`/png") }
end