File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 1515 < a href ="<%= results_path ( add_filter ( @enhanced_query , category , term [ 'key' ] ) ) %> ">
1616 < span class ="sr "> Apply filter:</ span >
1717 <% end %>
18- <% if Flipflop . enabled? ( :gdt ) %>
19- < span class ="name "> <%= gdt_sources ( term [ 'key' ] , category ) %> </ span >
20- <% end %>
18+ <% if Flipflop . enabled? ( :gdt ) %>
19+ < span class ="name "> <%= gdt_sources ( term [ 'key' ] , category ) %> </ span >
20+ <% else %>
21+ < span class ="name "> <%= term [ 'key' ] %> </ span >
22+ <% end %>
2123 < span class ="count "> <%= term [ 'docCount' ] %> < span class ="sr "> records</ span > </ span >
2224 </ a >
2325 </ li >
Original file line number Diff line number Diff line change @@ -139,6 +139,17 @@ class SearchControllerTest < ActionDispatch::IntegrationTest
139139 end
140140 end
141141
142+ test 'a filter category lists available filters with names and values' do
143+ VCR . use_cassette ( 'data basic controller' ,
144+ allow_playback_repeats : true ,
145+ match_requests_on : %i[ method uri body ] ) do
146+ get '/results?q=data'
147+ assert_response :success
148+ assert_select '.filter-options .category-terms .name' , { minimum : 1 }
149+ assert_select '.filter-options .category-terms .count' , { minimum : 1 }
150+ end
151+ end
152+
142153 test 'results with valid query has div for pagination' do
143154 VCR . use_cassette ( 'data basic controller' ,
144155 allow_playback_repeats : true ,
You can’t perform that action at this time.
0 commit comments