diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 12:45:46 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 12:45:46 +0300 |
commit | a7b3560714b4d9cc4ab32dffcd1f74a284b93580 (patch) | |
tree | 7452bd5c3545c2fa67a28aa013835fb4fa071baf /spec/frontend/fixtures/listbox.rb | |
parent | ee9173579ae56a3dbfe5afe9f9410c65bb327ca7 (diff) |
Add latest changes from gitlab-org/gitlab@14-8-stable-eev14.8.0-rc42
Diffstat (limited to 'spec/frontend/fixtures/listbox.rb')
-rw-r--r-- | spec/frontend/fixtures/listbox.rb | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/spec/frontend/fixtures/listbox.rb b/spec/frontend/fixtures/listbox.rb new file mode 100644 index 00000000000..8f8489a2827 --- /dev/null +++ b/spec/frontend/fixtures/listbox.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe 'initRedirectListboxBehavior', '(JavaScript fixtures)', type: :helper do + include JavaScriptFixturesHelpers + include ListboxHelper + + let(:response) { @tag } + + it 'listbox/redirect_listbox.html' do + items = [{ + value: 'foo', + text: 'Foo', + href: '/foo', + arbitrary_key: 'foo xyz' + }, { + value: 'bar', + text: 'Bar', + href: '/bar', + arbitrary_key: 'bar xyz' + }, { + value: 'qux', + text: 'Qux', + href: '/qux', + arbitrary_key: 'qux xyz' + }] + + @tag = helper.gl_redirect_listbox_tag(items, 'bar', class: %w[test-class-1 test-class-2], data: { right: true }) + end +end |