diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-02-17 17:20:35 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2016-02-17 17:20:35 +0000 |
commit | ff28ac9c18231c54b9a925d26915bf3e29548ddd (patch) | |
tree | 89697763f12c8ee59296f1833a95be77246ecc73 /spec/factories/notes.rb | |
parent | 879d66b6ab5cfd75e9b126f825b2e165b48a9ff1 (diff) | |
parent | 9823d00e0b13224ae9e820e7d3f9fade69201e99 (diff) | |
download | gitlab-ce-ff28ac9c18231c54b9a925d26915bf3e29548ddd.tar.gz |
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/factories/notes.rb')
-rw-r--r-- | spec/factories/notes.rb | 14 |
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 |