Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-10-26 15:08:44 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-10-26 15:08:44 +0300
commit6e320396b26439a0c3fa1df1ce9f4c2395518227 (patch)
tree46e646052ba87e38f6e6866692d92cdb01878189 /spec/helpers/sorting_helper_spec.rb
parentc60d68bbaca234673f2f689e1f7444ce8edbcf86 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/helpers/sorting_helper_spec.rb')
-rw-r--r--spec/helpers/sorting_helper_spec.rb18
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