summaryrefslogtreecommitdiff
path: root/spec/support/shared_examples/lib/gitlab
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-11-23 15:07:42 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-11-23 15:07:42 +0000
commitbc0f141f2f073a971aad1eb5349bb718747df028 (patch)
tree72fcc48dfac8e3f3560e22014eacdd2eaae8bc89 /spec/support/shared_examples/lib/gitlab
parent2c29837ce1692790dedccbc9b36b44dc8aaacbee (diff)
downloadgitlab-ce-bc0f141f2f073a971aad1eb5349bb718747df028.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/shared_examples/lib/gitlab')
-rw-r--r--spec/support/shared_examples/lib/gitlab/background_migration/backfill_project_repositories_shared_examples.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/support/shared_examples/lib/gitlab/background_migration/backfill_project_repositories_shared_examples.rb b/spec/support/shared_examples/lib/gitlab/background_migration/backfill_project_repositories_shared_examples.rb
index 459d4f5cd3e..7141492bd49 100644
--- a/spec/support/shared_examples/lib/gitlab/background_migration/backfill_project_repositories_shared_examples.rb
+++ b/spec/support/shared_examples/lib/gitlab/background_migration/backfill_project_repositories_shared_examples.rb
@@ -16,20 +16,20 @@ RSpec.shared_examples 'backfill migration for project repositories' do |storage|
projects.create!(name: "foo-#{index}", path: "foo-#{index}", namespace_id: group.id, storage_version: storage_version)
end
- expect { described_class.new.perform(1, projects.last.id) }.to change(project_repositories, :count).by(2)
+ expect { described_class.new.perform(1, projects.last.id) }.to change { project_repositories.count }.by(2)
end
it "does nothing for projects on #{storage} storage that have already a project_repository row" do
projects.create!(id: 1, name: 'foo', path: 'foo', namespace_id: group.id, storage_version: storage_version)
project_repositories.create!(project_id: 1, disk_path: 'phony/foo/bar', shard_id: shard.id)
- expect { described_class.new.perform(1, projects.last.id) }.not_to change(project_repositories, :count)
+ expect { described_class.new.perform(1, projects.last.id) }.not_to change { project_repositories.count }
end
it "does nothing for projects on #{storage == :legacy ? 'hashed' : 'legacy'} storage" do
projects.create!(name: 'foo', path: 'foo', namespace_id: group.id, storage_version: storage == :legacy ? 1 : nil)
- expect { described_class.new.perform(1, projects.last.id) }.not_to change(project_repositories, :count)
+ expect { described_class.new.perform(1, projects.last.id) }.not_to change { project_repositories.count }
end
it 'inserts rows in a single query' do