OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
avoid AnonymousUser persisting in after(:all) block
ulferts6f5095a83748
diff --git a/modules/storages/spec/requests/api/v3/file_links/file_links_api_spec.rb b/modules/storages/spec/requests/api/v3/file_links/file_links_api_spec.rbindex ea1b4112221..359a82c1c0f 100644--- a/modules/storages/spec/requests/api/v3/file_links/file_links_api_spec.rb+++ b/modules/storages/spec/requests/api/v3/file_links/file_links_api_spec.rb@@ -36,13 +36,13 @@ RSpec.describe 'API v3 file links resource' doinclude UserPermissionsHelperdef enable_module(project, modul)- project.enabled_module_names = project.enabled_module_names + [modul]- project.save+ project.enabled_modules.create(name: modul)enddef disable_module(project, modul)- project.enabled_module_names = project.enabled_module_names - [modul]- project.save+ # Avoid project.enabled_module_names and a subsequent save as that would create an AnonymousUser in an+ # after(:all) block, which persists the user in the RequestStore.+ project.enabled_modules.detect { |m| m.name == modul }.destroyendshared_association_default(:priority) { create(:priority) }