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
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-02-17 16:32:02 +0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-02-17 16:32:02 +0300
commit9823d00e0b13224ae9e820e7d3f9fade69201e99 (patch)
tree9a37f949fdfbd560e23150b1a42ca3979fe9c51e /spec/factories/notes.rb
parent943bed68bc42d02246ddea63a25432d3aba709e7 (diff)
Add ability to see and sort on vote count from Issues and MR lists
Diffstat (limited to 'spec/factories/notes.rb')
-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