diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
commit | 7e9c479f7de77702622631cff2628a9c8dcbc627 (patch) | |
tree | c8f718a08e110ad7e1894510980d2155a6549197 /spec/helpers/sorting_helper_spec.rb | |
parent | e852b0ae16db4052c1c567d9efa4facc81146e88 (diff) |
Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42
Diffstat (limited to 'spec/helpers/sorting_helper_spec.rb')
-rw-r--r-- | spec/helpers/sorting_helper_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/helpers/sorting_helper_spec.rb b/spec/helpers/sorting_helper_spec.rb index 6c52016139b..1c300aea2df 100644 --- a/spec/helpers/sorting_helper_spec.rb +++ b/spec/helpers/sorting_helper_spec.rb @@ -50,6 +50,24 @@ RSpec.describe SortingHelper do end end + describe '#search_sort_direction_button' do + before do + set_sorting_url 'test_label' + end + + it 'keeps label filter param' do + expect(search_sort_direction_button('created_asc')).to include('label_name=test_label') + end + + it 'returns icon with sort-lowest when sort is asc' do + expect(search_sort_direction_button('created_asc')).to include('sort-lowest') + end + + it 'returns icon with sort-highest when sort is desc' do + expect(search_sort_direction_button('created_desc')).to include('sort-highest') + end + end + def stub_controller_path(value) allow(helper.controller).to receive(:controller_path).and_return(value) end |