diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 06:09:43 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 06:09:43 +0000 |
commit | 98087a9853200d21ecaf50c075ee4346769c89c6 (patch) | |
tree | 6f70b3a7c189c8bf9a4c8eb0bef6472d29a0e7a6 /spec/factories_spec.rb | |
parent | b288724dd2141b12bb6d5b971b9d7bc9c23a11a7 (diff) | |
download | gitlab-ce-98087a9853200d21ecaf50c075ee4346769c89c6.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/factories_spec.rb')
-rw-r--r-- | spec/factories_spec.rb | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/spec/factories_spec.rb b/spec/factories_spec.rb index 38ade20de28..cc84a5de368 100644 --- a/spec/factories_spec.rb +++ b/spec/factories_spec.rb @@ -29,9 +29,16 @@ RSpec.describe 'factories' do # and reuse them in other factories. # # However, for some factories we cannot use FactoryDefault because the - # associations must be unique and cannot be reused. + # associations must be unique and cannot be reused, or the factory default + # is being mutated. skip_factory_defaults = %i[ fork_network_member + group_member + import_state + namespace + project_broken_repo + users_star_project + wiki_page ].to_set.freeze # Some factories and their corresponding models are based on @@ -46,9 +53,9 @@ RSpec.describe 'factories' do .partition { |factory| skip_factory_defaults.include?(factory.name) } context 'with factory defaults', factory_default: :keep do - let_it_be(:namespace) { create_default(:namespace) } - let_it_be(:project) { create_default(:project, :repository) } - let_it_be(:user) { create_default(:user) } + let_it_be(:namespace) { create_default(:namespace).freeze } + let_it_be(:project) { create_default(:project, :repository).freeze } + let_it_be(:user) { create_default(:user).freeze } before do factories_based_on_view.each do |factory| |