Fix vote counting

This commit is contained in:
Riyad Preukschas 2012-10-30 03:27:36 +01:00
parent 6c6f415cae
commit ae067ee322
7 changed files with 186 additions and 117 deletions

View file

@ -91,6 +91,32 @@ FactoryGirl.define do
factory :note do
project
note "Note"
author
factory :note_on_commit, traits: [:on_commit]
factory :note_on_commit_line, traits: [:on_commit, :on_line]
factory :note_on_issue, traits: [:on_issue], aliases: [:votable_note]
factory :note_on_merge_request, traits: [:on_merge_request]
factory :note_on_merge_request_line, traits: [:on_merge_request, :on_line]
trait :on_commit do
noteable_id "bcf03b5de6c33f3869ef70d68cf06e679d1d7f9a"
noteable_type "Commit"
end
trait :on_line do
line_code "0_184_184"
end
trait :on_merge_request do
noteable_id 1
noteable_type "MergeRequest"
end
trait :on_issue do
noteable_id 1
noteable_type "Issue"
end
end
factory :event do