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:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-07-11 22:15:59 +0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-07-12 18:14:17 +0300
commit38a58978aa7969908ef31f2eac99138da2be869b (patch)
tree83ee2ad1c9fca0d568e84436333e367b6145d1bc /spec/lib/gitlab/github_import/client_spec.rb
parent158786caae7d025b2797008926cfd7d519367b87 (diff)
Fix GItHub client requests when rate limit is disabled
Diffstat (limited to 'spec/lib/gitlab/github_import/client_spec.rb')
-rw-r--r--spec/lib/gitlab/github_import/client_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/lib/gitlab/github_import/client_spec.rb b/spec/lib/gitlab/github_import/client_spec.rb
index 3b023a35446..efce10dbf15 100644
--- a/spec/lib/gitlab/github_import/client_spec.rb
+++ b/spec/lib/gitlab/github_import/client_spec.rb
@@ -61,4 +61,13 @@ describe Gitlab::GithubImport::Client, lib: true do
expect(client.api.api_endpoint).to eq 'https://github.company.com/'
end
end
+
+ context 'when rate limit is disabled' do
+ it 'does not raise error' do
+ stub_request(:get, /api.github.com/)
+ allow(client.api).to receive(:rate_limit!).and_raise(Octokit::NotFound)
+
+ expect { client.issues }.not_to raise_error
+ end
+ end
end