debian-mirror-gitlab/spec/factories/wikis.rb

22 lines
424 B
Ruby
Raw Normal View History

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