diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-20 14:43:17 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-20 14:43:17 +0300 |
commit | dfc94207fec2d84314b1a5410cface22e8b369bd (patch) | |
tree | c54022f61ced104305889a64de080998a0dc773b /spec/lib/gitlab/github_import/representation/pull_requests/review_requests_spec.rb | |
parent | b874efeff674f6bf0355d5d242ecf81c6f7155df (diff) |
Add latest changes from gitlab-org/gitlab@15-11-stable-eev15.11.0-rc42
Diffstat (limited to 'spec/lib/gitlab/github_import/representation/pull_requests/review_requests_spec.rb')
-rw-r--r-- | spec/lib/gitlab/github_import/representation/pull_requests/review_requests_spec.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/lib/gitlab/github_import/representation/pull_requests/review_requests_spec.rb b/spec/lib/gitlab/github_import/representation/pull_requests/review_requests_spec.rb index 0393f692a69..0259fbedee3 100644 --- a/spec/lib/gitlab/github_import/representation/pull_requests/review_requests_spec.rb +++ b/spec/lib/gitlab/github_import/representation/pull_requests/review_requests_spec.rb @@ -46,4 +46,27 @@ RSpec.describe Gitlab::GithubImport::Representation::PullRequests::ReviewRequest let(:review_requests) { described_class.from_json_hash(response) } end end + + describe '#github_identifiers' do + it 'returns a hash with needed identifiers' do + review_requests = { + merge_request_iid: 2, + merge_request_id: merge_request_id, + users: [ + { id: 4, login: 'alice' }, + { id: 5, login: 'bob' } + ] + } + + github_identifiers = { + merge_request_iid: 2, + requested_reviewers: %w[alice bob] + } + + other_attributes = { merge_request_id: 123, something_else: '_something_else_' } + review_requests = described_class.new(review_requests.merge(other_attributes)) + + expect(review_requests.github_identifiers).to eq(github_identifiers) + end + end end |