Commit 2d53333c authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Extract EE code in spec/factories/notes.rb

Uses FactoryBot.modify to override the factory and moved the file to the
ee folder
parent f6720560
# frozen_string_literal: true
FactoryBot.modify do
factory :note do
trait :on_epic do
noteable { create(:epic) }
project nil
end
end
end
FactoryBot.define do
factory :note_on_epic, parent: :note, traits: [:on_epic]
end
......@@ -14,7 +14,6 @@ FactoryBot.define do
factory :note_on_merge_request, traits: [:on_merge_request]
factory :note_on_project_snippet, traits: [:on_project_snippet]
factory :note_on_personal_snippet, traits: [:on_personal_snippet]
factory :note_on_epic, traits: [:on_epic]
factory :system_note, traits: [:system]
factory :discussion_note, class: DiscussionNote
......@@ -134,11 +133,6 @@ FactoryBot.define do
project nil
end
trait :on_epic do
noteable { create(:epic) }
project nil
end
trait :system do
system true
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment