From 7dddd45ebfcfe292aadadd57a027dd32810c2005 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Wed, 17 Feb 2016 17:20:35 +0000 Subject: 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 --- spec/factories/notes.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'spec') 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 -- cgit v1.2.3