diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-07-11 16:15:59 -0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-07-12 12:14:17 -0300 |
commit | 38a58978aa7969908ef31f2eac99138da2be869b (patch) | |
tree | 83ee2ad1c9fca0d568e84436333e367b6145d1bc /spec/lib/gitlab/github_import/client_spec.rb | |
parent | 158786caae7d025b2797008926cfd7d519367b87 (diff) | |
download | gitlab-ce-38a58978aa7969908ef31f2eac99138da2be869b.tar.gz |
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.rb | 9 |
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 |