diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-18 23:02:30 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-18 23:02:30 +0300 |
commit | 41fe97390ceddf945f3d967b8fdb3de4c66b7dea (patch) | |
tree | 9c8d89a8624828992f06d892cd2f43818ff5dcc8 /spec/helpers/listbox_helper_spec.rb | |
parent | 0804d2dc31052fb45a1efecedc8e06ce9bc32862 (diff) |
Add latest changes from gitlab-org/gitlab@14-9-stable-eev14.9.0-rc42
Diffstat (limited to 'spec/helpers/listbox_helper_spec.rb')
-rw-r--r-- | spec/helpers/listbox_helper_spec.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/spec/helpers/listbox_helper_spec.rb b/spec/helpers/listbox_helper_spec.rb index 8935d69d4f7..0a27aa04b37 100644 --- a/spec/helpers/listbox_helper_spec.rb +++ b/spec/helpers/listbox_helper_spec.rb @@ -65,10 +65,13 @@ RSpec.describe ListboxHelper do end context 'when selected does not match any item' do - let(:selected) { 'qux' } + where(selected: [nil, 'qux']) - it 'raises an error' do - expect { subject }.to raise_error(ArgumentError, /cannot find qux/) + with_them do + it 'selects first item' do + expect(subject.at_css('button').content).to eq('Foo') + expect(subject.attributes['data-selected'].value).to eq('foo') + end end end end |