diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-04-30 23:16:19 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-05-11 00:01:01 -0400 |
commit | 48e6fb532a6655b98319403c5e8699f7daf0305e (patch) | |
tree | 9137cd844f66842044bd72705268b44d84d44b6c /spec/factories | |
parent | 0e89ff0fb05973bb3ff6930906d52f10517efa62 (diff) | |
download | gitlab-ce-48e6fb532a6655b98319403c5e8699f7daf0305e.tar.gz |
Add a SystemNoteService class
There's a lot of code in the Note model that only deals with creating
system notes, so we're going to split that into its own class.
Diffstat (limited to 'spec/factories')
-rw-r--r-- | spec/factories/notes.rb | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/spec/factories/notes.rb b/spec/factories/notes.rb index f1c33461b55..1e4c0b03f7b 100644 --- a/spec/factories/notes.rb +++ b/spec/factories/notes.rb @@ -25,12 +25,13 @@ FactoryGirl.define do note "Note" author - factory :note_on_commit, traits: [:on_commit] - factory :note_on_commit_diff, traits: [:on_commit, :on_diff] - factory :note_on_issue, traits: [:on_issue], aliases: [:votable_note] - factory :note_on_merge_request, traits: [:on_merge_request] + factory :note_on_commit, traits: [:on_commit] + factory :note_on_commit_diff, traits: [:on_commit, :on_diff] + 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_project_snippet, traits: [:on_project_snippet] + factory :note_on_project_snippet, traits: [:on_project_snippet] + factory :system_note, traits: [:system] trait :on_commit do project factory: :project @@ -58,6 +59,10 @@ FactoryGirl.define do noteable_type "Snippet" end + trait :system do + system true + end + trait :with_attachment do attachment { fixture_file_upload(Rails.root + "spec/fixtures/dk.png", "`/png") } end |