diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-20 12:40:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-20 12:40:42 +0300 |
commit | ee664acb356f8123f4f6b00b73c1e1cf0866c7fb (patch) | |
tree | f8479f94a28f66654c6a4f6fb99bad6b4e86a40e /spec/lib/gitlab/push_options_spec.rb | |
parent | 62f7d5c5b69180e82ae8196b7b429eeffc8e7b4f (diff) |
Add latest changes from gitlab-org/gitlab@15-5-stable-eev15.5.0-rc42
Diffstat (limited to 'spec/lib/gitlab/push_options_spec.rb')
-rw-r--r-- | spec/lib/gitlab/push_options_spec.rb | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/spec/lib/gitlab/push_options_spec.rb b/spec/lib/gitlab/push_options_spec.rb index 3ff1c8e9012..054beaf7012 100644 --- a/spec/lib/gitlab/push_options_spec.rb +++ b/spec/lib/gitlab/push_options_spec.rb @@ -52,10 +52,11 @@ RSpec.describe Gitlab::PushOptions do end it 'can parse multiple push options' do - options = described_class.new([ - 'merge_request.create', - 'merge_request.target=value' - ]) + options = described_class.new( + [ + 'merge_request.create', + 'merge_request.target=value' + ]) expect(options.get(:merge_request)).to include({ create: true, @@ -66,19 +67,21 @@ RSpec.describe Gitlab::PushOptions do end it 'stores options internally as a HashWithIndifferentAccess' do - options = described_class.new([ - 'merge_request.create' - ]) + options = described_class.new( + [ + 'merge_request.create' + ]) expect(options.get('merge_request', 'create')).to eq(true) expect(options.get(:merge_request, :create)).to eq(true) end it 'selects the last option when options contain duplicate namespace and key pairs' do - options = described_class.new([ - 'merge_request.target=value1', - 'merge_request.target=value2' - ]) + options = described_class.new( + [ + 'merge_request.target=value1', + 'merge_request.target=value2' + ]) expect(options.get(:merge_request, :target)).to eq('value2') end |