2019-07-25 01:11:48 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-12-13 19:13:44 -05:00
|
|
|
FactoryBot.define do
|
2016-03-11 11:47:05 -05:00
|
|
|
factory :project_group_link do
|
2017-08-02 15:55:11 -04:00
|
|
|
project
|
2016-03-11 11:47:05 -05:00
|
|
|
group
|
2019-10-01 20:06:26 -04:00
|
|
|
expires_at { nil }
|
2020-06-03 02:08:34 -04:00
|
|
|
group_access { Gitlab::Access::DEVELOPER }
|
2020-04-09 14:09:34 -04:00
|
|
|
|
|
|
|
trait(:guest) { group_access { Gitlab::Access::GUEST } }
|
|
|
|
trait(:reporter) { group_access { Gitlab::Access::REPORTER } }
|
|
|
|
trait(:developer) { group_access { Gitlab::Access::DEVELOPER } }
|
|
|
|
trait(:maintainer) { group_access { Gitlab::Access::MAINTAINER } }
|
2020-06-03 02:08:34 -04:00
|
|
|
|
|
|
|
after(:create) do |project_group_link, evaluator|
|
|
|
|
project_group_link.group.refresh_members_authorized_projects
|
|
|
|
end
|
2016-03-11 11:47:05 -05:00
|
|
|
end
|
|
|
|
end
|