diff options
author | Alexis Reigel <alexis.reigel.ext@siemens.com> | 2017-11-08 15:08:13 +0300 |
---|---|---|
committer | Alexis Reigel <alexis.reigel.ext@siemens.com> | 2018-04-23 10:21:52 +0300 |
commit | dd785467393610a73da6e9fd8413bca685d9356c (patch) | |
tree | 19a5546323653d724f7d9fe5fd6d08b4e758b630 /spec/factories/projects.rb | |
parent | a2a7ad291f64a5db74c1bc21fb556e6e8862d0f3 (diff) |
project#group_runner_enabled -> project_settings
Diffstat (limited to 'spec/factories/projects.rb')
-rw-r--r-- | spec/factories/projects.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/spec/factories/projects.rb b/spec/factories/projects.rb index 1761b6e2a3b..ad33d09f78a 100644 --- a/spec/factories/projects.rb +++ b/spec/factories/projects.rb @@ -15,14 +15,18 @@ FactoryBot.define do namespace creator { group ? create(:user) : namespace&.owner } - # Nest Project Feature attributes transient do + # Nest Project Feature attributes wiki_access_level ProjectFeature::ENABLED builds_access_level ProjectFeature::ENABLED snippets_access_level ProjectFeature::ENABLED issues_access_level ProjectFeature::ENABLED merge_requests_access_level ProjectFeature::ENABLED repository_access_level ProjectFeature::ENABLED + + # we can't assign the delegated `#settings` attributes directly, as the + # `#settings` relation needs to be created first + group_runners_enabled nil end after(:create) do |project, evaluator| @@ -47,6 +51,9 @@ FactoryBot.define do end project.group&.refresh_members_authorized_projects + + # assign the delegated `#settings` attributes after create + project.reload.group_runners_enabled = evaluator.group_runners_enabled unless evaluator.group_runners_enabled.nil? end trait :public do |