diff options
author | Jack Weeden <jack@ajack.org> | 2013-06-26 15:32:34 +0100 |
---|---|---|
committer | Jack Weeden <jack@ajack.org> | 2013-07-01 10:48:02 +0100 |
commit | 20b2a0b235d01a63cb0cf47b6329b557242a3981 (patch) | |
tree | 53d725410ba2b5207447340c991d5731fd6ef2cc /spec/factories.rb | |
parent | b62c9e5991dae0e4a8ae8e947b438cdd4e753c79 (diff) | |
download | gitlab-ce-20b2a0b235d01a63cb0cf47b6329b557242a3981.tar.gz |
Ability to edit comments
Diffstat (limited to 'spec/factories.rb')
-rw-r--r-- | spec/factories.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/factories.rb b/spec/factories.rb index b596f80fa9e..bd2ec6abf62 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 @@ -120,6 +122,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 @@ -141,6 +144,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 |