diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 14:59:07 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 14:59:07 +0300 |
commit | 8b573c94895dc0ac0e1d9d59cf3e8745e8b539ca (patch) | |
tree | 544930fb309b30317ae9797a9683768705d664c4 /spec/lib/gitlab/github_import/client_spec.rb | |
parent | 4b1de649d0168371549608993deac953eb692019 (diff) |
Add latest changes from gitlab-org/gitlab@13-7-stable-eev13.7.0-rc42
Diffstat (limited to 'spec/lib/gitlab/github_import/client_spec.rb')
-rw-r--r-- | spec/lib/gitlab/github_import/client_spec.rb | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/spec/lib/gitlab/github_import/client_spec.rb b/spec/lib/gitlab/github_import/client_spec.rb index bc734644d29..4000e0b2611 100644 --- a/spec/lib/gitlab/github_import/client_spec.rb +++ b/spec/lib/gitlab/github_import/client_spec.rb @@ -28,6 +28,17 @@ RSpec.describe Gitlab::GithubImport::Client do end end + describe '#pull_request_reviews' do + it 'returns the pull request reviews' do + client = described_class.new('foo') + + expect(client.octokit).to receive(:pull_request_reviews).with('foo/bar', 999) + expect(client).to receive(:with_rate_limit).and_yield + + client.pull_request_reviews('foo/bar', 999) + end + end + describe '#repository' do it 'returns the details of a repository' do client = described_class.new('foo') @@ -39,6 +50,17 @@ RSpec.describe Gitlab::GithubImport::Client do end end + describe '#pull_request' do + it 'returns the details of a pull_request' do + client = described_class.new('foo') + + expect(client.octokit).to receive(:pull_request).with('foo/bar', 999) + expect(client).to receive(:with_rate_limit).and_yield + + client.pull_request('foo/bar', 999) + end + end + describe '#labels' do it 'returns the labels' do client = described_class.new('foo') @@ -478,7 +500,7 @@ RSpec.describe Gitlab::GithubImport::Client do it 'searches for repositories based on name' do expected_search_query = 'test in:name is:public,private user:user repo:repo1 repo:repo2 org:org1 org:org2' - expect(client).to receive(:each_page).with(:search_repositories, expected_search_query) + expect(client.octokit).to receive(:search_repositories).with(expected_search_query, {}) client.search_repos_by_name('test') end |