From 61ad1da134d306cf09075940cf52639c8314cfc3 Mon Sep 17 00:00:00 2001 From: Felipe Artur Date: Tue, 11 Dec 2018 15:11:08 -0200 Subject: Fix issuables sort direction button parameters Fix labels parameter being deleted from filter when clicking sort direction button on issues/merge requests search bar. --- spec/helpers/sorting_helper_spec.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'spec/helpers/sorting_helper_spec.rb') diff --git a/spec/helpers/sorting_helper_spec.rb b/spec/helpers/sorting_helper_spec.rb index cba0d93e144..f405268d198 100644 --- a/spec/helpers/sorting_helper_spec.rb +++ b/spec/helpers/sorting_helper_spec.rb @@ -21,7 +21,11 @@ describe SortingHelper do describe '#issuable_sort_direction_button' do before do - allow(self).to receive(:request).and_return(double(path: 'http://test.com', query_parameters: {})) + allow(self).to receive(:request).and_return(double(path: 'http://test.com', query_parameters: { label_name: 'test_label' })) + end + + it 'keeps label filter param' do + expect(issuable_sort_direction_button('created_date')).to include('label_name=test_label') end it 'returns icon with sort-highest when sort is created_date' do -- cgit v1.2.3