summaryrefslogtreecommitdiff
path: root/spec/migrations/cleanup_projects_with_missing_namespace_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 15:44:42 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 15:44:42 +0000
commit4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch)
tree5423a1c7516cffe36384133ade12572cf709398d /spec/migrations/cleanup_projects_with_missing_namespace_spec.rb
parente570267f2f6b326480d284e0164a6464ba4081bc (diff)
downloadgitlab-ce-4555e1b21c365ed8303ffb7a3325d773c9b8bf31.tar.gz
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'spec/migrations/cleanup_projects_with_missing_namespace_spec.rb')
-rw-r--r--spec/migrations/cleanup_projects_with_missing_namespace_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/migrations/cleanup_projects_with_missing_namespace_spec.rb b/spec/migrations/cleanup_projects_with_missing_namespace_spec.rb
index cef6e0f470f..a50e98faf48 100644
--- a/spec/migrations/cleanup_projects_with_missing_namespace_spec.rb
+++ b/spec/migrations/cleanup_projects_with_missing_namespace_spec.rb
@@ -95,12 +95,12 @@ RSpec.describe CleanupProjectsWithMissingNamespace, :migration, schema: SchemaVe
expect(
described_class::Group
.joins('INNER JOIN members ON namespaces.id = members.source_id')
- .where('namespaces.type = ?', 'Group')
- .where('members.type = ?', 'GroupMember')
- .where('members.source_type = ?', 'Namespace')
- .where('members.user_id = ?', ghost_user.id)
- .where('members.requested_at IS NULL')
- .where('members.access_level = ?', described_class::ACCESS_LEVEL_OWNER)
+ .where(namespaces: { type: 'Group' })
+ .where(members: { type: 'GroupMember' })
+ .where(members: { source_type: 'Namespace' })
+ .where(members: { user_id: ghost_user.id })
+ .where(members: { requested_at: nil })
+ .where(members: { access_level: described_class::ACCESS_LEVEL_OWNER })
.where(
described_class::Group
.arel_table[:name]