Skip to content
Snippets Groups Projects
Verified Commit 2091079f authored by James Nutt's avatar James Nutt :palm_tree: Committed by GitLab
Browse files

Merge branch 'only-stub-throttled-for-github-import' into 'master'

Only stub throttled? for github_import

See merge request gitlab-org/gitlab!190664



Merged-by: default avatarJames Nutt <jnutt@gitlab.com>
Approved-by: default avatarJames Nutt <jnutt@gitlab.com>
Co-authored-by: default avatarKeeyan Nejad <knejad@gitlab.com>
parents 7f3cb94c 67094c45
No related branches found
No related tags found
No related merge requests found
......@@ -31,7 +31,7 @@
before do
allow(client).to receive_message_chain(:octokit, :rate_limit, :limit)
allow(client).to receive_message_chain(:octokit, :rate_limit, :remaining).and_return(100)
allow(::Gitlab::ApplicationRateLimiter).to receive(:throttled?).and_return(false)
allow(::Gitlab::ApplicationRateLimiter).to receive(:throttled?).with(:github_import, scope: user).and_return(false)
allow(Gitlab::GithubImport::Settings).to receive(:new).with(project_double).and_return(settings)
allow(settings)
.to receive(:write)
......
......@@ -40,7 +40,7 @@
pagination_limit: pagination_limit
)
allow(::Gitlab::ApplicationRateLimiter).to receive(:throttled?).and_return(false)
allow(::Gitlab::ApplicationRateLimiter).to receive(:throttled?).with(:github_import, scope: user).and_return(false)
end
context 'with an input error' do
......@@ -73,7 +73,7 @@
context 'when the rate limit is reached' do
before do
allow(::Gitlab::ApplicationRateLimiter).to receive(:throttled?).and_return(true)
allow(::Gitlab::ApplicationRateLimiter).to receive(:throttled?).with(:github_import, scope: user).and_return(true)
end
it 'returns an error relating to the rate limit' do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment