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/requests/api/group_export_spec.rb')
-rw-r--r--spec/requests/api/group_export_spec.rb14
1 files changed, 8 insertions, 6 deletions
diff --git a/spec/requests/api/group_export_spec.rb b/spec/requests/api/group_export_spec.rb
index ffa313d4464..bda46f85140 100644
--- a/spec/requests/api/group_export_spec.rb
+++ b/spec/requests/api/group_export_spec.rb
@@ -32,9 +32,9 @@ RSpec.describe API::GroupExport do
context 'when export file exists' do
before do
- allow(Gitlab::ApplicationRateLimiter)
- .to receive(:increment)
- .and_return(0)
+ allow_next_instance_of(Gitlab::ApplicationRateLimiter::BaseStrategy) do |strategy|
+ allow(strategy).to receive(:increment).and_return(0)
+ end
upload.export_file = fixture_file_upload('spec/fixtures/group_export.tar.gz', "`/tar.gz")
upload.save!
@@ -149,9 +149,11 @@ RSpec.describe API::GroupExport do
before do
group.add_owner(user)
- allow(Gitlab::ApplicationRateLimiter)
- .to receive(:increment)
- .and_return(Gitlab::ApplicationRateLimiter.rate_limits[:group_export][:threshold].call + 1)
+ allow_next_instance_of(Gitlab::ApplicationRateLimiter::BaseStrategy) do |strategy|
+ allow(strategy)
+ .to receive(:increment)
+ .and_return(Gitlab::ApplicationRateLimiter.rate_limits[:group_export][:threshold].call + 1)
+ end
end
it 'throttles the endpoint' do