2020-04-22 08:09:29 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
FactoryBot.define do
|
|
|
|
factory :wiki do
|
|
|
|
transient do
|
2020-09-24 08:09:37 -04:00
|
|
|
container { association(:project) }
|
2020-09-25 14:09:46 -04:00
|
|
|
user { container.default_owner || association(:user) }
|
2020-04-22 08:09:29 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
initialize_with { Wiki.for_container(container, user) }
|
|
|
|
skip_create
|
|
|
|
|
|
|
|
factory :project_wiki do
|
|
|
|
transient do
|
2020-09-24 08:09:37 -04:00
|
|
|
project { association(:project) }
|
2020-04-22 08:09:29 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
container { project }
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|