Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/services/snippets/repository_validation_service_spec.rb')
-rw-r--r--spec/services/snippets/repository_validation_service_spec.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/services/snippets/repository_validation_service_spec.rb b/spec/services/snippets/repository_validation_service_spec.rb
index e2a0d0faa18..8166ce144e1 100644
--- a/spec/services/snippets/repository_validation_service_spec.rb
+++ b/spec/services/snippets/repository_validation_service_spec.rb
@@ -40,7 +40,7 @@ RSpec.describe Snippets::RepositoryValidationService do
end
it 'returns error when the repository has more file than the limit' do
- limit = Snippet.max_file_limit(user) + 1
+ limit = Snippet.max_file_limit + 1
files = Array.new(limit) { FFaker::Filesystem.file_name }
allow(repository).to receive(:ls_files).and_return(files)
@@ -56,7 +56,9 @@ RSpec.describe Snippets::RepositoryValidationService do
end
it 'returns error when the repository size is over the limit' do
- expect_any_instance_of(Gitlab::RepositorySizeChecker).to receive(:above_size_limit?).and_return(true)
+ expect_next_instance_of(Gitlab::RepositorySizeChecker) do |checker|
+ expect(checker).to receive(:above_size_limit?).and_return(true)
+ end
expect(subject).to be_error
expect(subject.message).to match /Repository size is above the limit/