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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
503 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) }
2022-03-02 08:16:31 +05:30
user { container.first_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
2021-01-29 00:20:46 +05:30
trait :empty_repo do
after(:create, &:create_wiki_repository)
end
2020-05-24 23:13:21 +05:30
end
end