2020-05-24 23:13:21 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
FactoryBot.define do
|
|
|
|
factory :wiki do
|
|
|
|
transient do
|
2021-01-03 14:25:43 +05:30
|
|
|
container { association(:project) }
|
|
|
|
user { container.default_owner || association(:user) }
|
2020-05-24 23:13:21 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
initialize_with { Wiki.for_container(container, user) }
|
|
|
|
skip_create
|
|
|
|
|
|
|
|
factory :project_wiki do
|
|
|
|
transient do
|
2021-01-03 14:25:43 +05:30
|
|
|
project { association(:project) }
|
2020-05-24 23:13:21 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
container { project }
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|