summaryrefslogtreecommitdiff
path: root/spec/factories.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-07-02 11:47:09 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-07-02 11:47:09 +0300
commitee890f2b2a66be925746f2238dc462a74b0fd219 (patch)
treebb2e74eb834d5c69f66e42c7a80af1705e616ea9 /spec/factories.rb
parentf49fb5dca1ecf2b1ae6415920de09b4d95c14bb1 (diff)
parent7588186e8173f53a7f9b86d2b6959d7f94a3caac (diff)
downloadgitlab-ce-ee890f2b2a66be925746f2238dc462a74b0fd219.tar.gz
Merge branch 'master' into 6-0-dev
Conflicts: app/views/dashboard/projects.html.haml app/views/layouts/_head_panel.html.haml config/routes.rb
Diffstat (limited to 'spec/factories.rb')
-rw-r--r--spec/factories.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/factories.rb b/spec/factories.rb
index 272623440e1..793bd2434e8 100644
--- a/spec/factories.rb
+++ b/spec/factories.rb
@@ -1,3 +1,5 @@
+include ActionDispatch::TestProcess
+
FactoryGirl.define do
sequence :sentence, aliases: [:title, :content] do
Faker::Lorem.sentence
@@ -127,6 +129,7 @@ FactoryGirl.define do
factory :note_on_issue, traits: [:on_issue], aliases: [:votable_note]
factory :note_on_merge_request, traits: [:on_merge_request]
factory :note_on_merge_request_diff, traits: [:on_merge_request, :on_diff]
+ factory :note_on_merge_request_with_attachment, traits: [:on_merge_request, :with_attachment]
trait :on_commit do
project factory: :project_with_code
@@ -148,6 +151,10 @@ FactoryGirl.define do
noteable_id 1
noteable_type "Issue"
end
+
+ trait :with_attachment do
+ attachment { fixture_file_upload(Rails.root + "spec/fixtures/dk.png", "image/png") }
+ end
end
factory :event do