diff options
author | ZJ van de Weg <zegerjan@gitlab.com> | 2016-05-30 15:46:23 +0300 |
---|---|---|
committer | Z.J. van de Weg <zegerjan@gitlab.com> | 2016-05-30 19:54:08 +0300 |
commit | cbd7801b3d1d435a95ec70032c5acc9df33b0337 (patch) | |
tree | 7bd367bf31690e4a6b0115d238cf2c312c9fb2ab /spec/factories/notes.rb | |
parent | f99b38c9d5dab11677b2680a671c1a66fb69283b (diff) | |
parent | 2485bd7bbf9686f993d2a417943feff5c7d5b6f3 (diff) |
Merge branch 'master' into awardables
Diffstat (limited to 'spec/factories/notes.rb')
-rw-r--r-- | spec/factories/notes.rb | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/spec/factories/notes.rb b/spec/factories/notes.rb index 2603b4fb0ce..696cf276e57 100644 --- a/spec/factories/notes.rb +++ b/spec/factories/notes.rb @@ -7,6 +7,7 @@ FactoryGirl.define do project note "Note" author + on_issue factory :note_on_commit, traits: [:on_commit] factory :note_on_commit_diff, traits: [:on_commit, :on_diff], class: LegacyDiffNote @@ -17,29 +18,26 @@ FactoryGirl.define do factory :system_note, traits: [:system] trait :on_commit do - project + noteable nil + noteable_id nil + noteable_type 'Commit' commit_id RepoHelpers.sample_commit.id - noteable_type "Commit" end trait :on_diff do line_code "0_184_184" end - trait :on_merge_request do - project - noteable_id 1 - noteable_type "MergeRequest" + trait :on_issue do + noteable { create(:issue, project: project) } end - trait :on_issue do - noteable_id 1 - noteable_type "Issue" + trait :on_merge_request do + noteable { create(:merge_request, source_project: project) } end trait :on_project_snippet do - noteable_id 1 - noteable_type "Snippet" + noteable { create(:snippet, project: project) } end trait :system do |