@@ -82,11 +82,11 @@ class PresentedSpecialistDocument < SpecialistDocumentTestCase
82
82
test "has title without context" do
83
83
assert presented_item ( "aaib-reports" ) . is_a? ( ContentItem ::TitleAndContext )
84
84
title_component_params = {
85
- title : schema_item ( "aaib-reports" ) [ "title" ] ,
86
- context_locale : nil ,
87
- average_title_length : "long" ,
85
+ title : schema_item ( "aaib-reports" ) [ "title" ] ,
86
+ context_locale : nil ,
87
+ average_title_length : "long" ,
88
88
89
- }
89
+ }
90
90
91
91
assert_equal title_component_params , presented_item ( "aaib-reports" ) . title_and_context
92
92
end
@@ -215,17 +215,17 @@ def example_facet(overrides = {})
215
215
216
216
test "ignores facets if valid key but set to an empty string" do
217
217
example = example_with_finder_facets ( [
218
- {
219
- "name" => "Facet name" ,
220
- "key" => "facet-key" ,
221
- "type" => "text" ,
222
- } ,
223
- {
224
- "name" => "Date facet" ,
225
- "key" => "date-facet" ,
226
- "type" => "date" ,
227
- } ,
228
- ] ,
218
+ {
219
+ "name" => "Facet name" ,
220
+ "key" => "facet-key" ,
221
+ "type" => "text" ,
222
+ } ,
223
+ {
224
+ "name" => "Date facet" ,
225
+ "key" => "date-facet" ,
226
+ "type" => "date" ,
227
+ } ,
228
+ ] ,
229
229
"facet-key" => "" ,
230
230
"date-facet" => "" )
231
231
@@ -283,27 +283,27 @@ def example_facet(overrides = {})
283
283
284
284
test "puts date facets together and before text facets" do
285
285
example = example_with_finder_facets ( [
286
- {
287
- "name" => "Facet name" ,
288
- "key" => "facet-key" ,
289
- "type" => "text" ,
290
- } ,
291
- {
292
- "name" => "First date facet" ,
293
- "key" => "first-date-facet" ,
294
- "type" => "date" ,
295
- } ,
296
- {
297
- "name" => "Second date facet" ,
298
- "key" => "second-date-facet" ,
299
- "type" => "date" ,
300
- } ,
301
- {
302
- "name" => "More text" ,
303
- "key" => "more-text" ,
304
- "type" => "text" ,
305
- } ,
306
- ] ,
286
+ {
287
+ "name" => "Facet name" ,
288
+ "key" => "facet-key" ,
289
+ "type" => "text" ,
290
+ } ,
291
+ {
292
+ "name" => "First date facet" ,
293
+ "key" => "first-date-facet" ,
294
+ "type" => "date" ,
295
+ } ,
296
+ {
297
+ "name" => "Second date facet" ,
298
+ "key" => "second-date-facet" ,
299
+ "type" => "date" ,
300
+ } ,
301
+ {
302
+ "name" => "More text" ,
303
+ "key" => "more-text" ,
304
+ "type" => "text" ,
305
+ } ,
306
+ ] ,
307
307
"facet-key" => "Text" ,
308
308
"first-date-facet" => "2010-01-01" ,
309
309
"second-date-facet" => "2010-02-03" ,
@@ -327,12 +327,12 @@ def example_facet(overrides = {})
327
327
328
328
test "omits first_published_at facet values from `other` section of component parameters to avoid duplicates" do
329
329
facets = [
330
- {
331
- "name" => "Published" ,
332
- "key" => "first_published_at" ,
333
- "type" => "date" ,
334
- } ,
335
- ]
330
+ {
331
+ "name" => "Published" ,
332
+ "key" => "first_published_at" ,
333
+ "type" => "date" ,
334
+ } ,
335
+ ]
336
336
example = example_with_finder_facets ( facets , "first_published_at" => "2010-01-01" )
337
337
338
338
presented = present_example ( example )
@@ -341,12 +341,12 @@ def example_facet(overrides = {})
341
341
342
342
test "uses first published date in facets as canonical publish date if provided" do
343
343
facets = [
344
- {
345
- "name" => "Published" ,
346
- "key" => "first_published_at" ,
347
- "type" => "date" ,
348
- } ,
349
- ]
344
+ {
345
+ "name" => "Published" ,
346
+ "key" => "first_published_at" ,
347
+ "type" => "date" ,
348
+ } ,
349
+ ]
350
350
example = example_with_finder_facets ( facets , "first_published_at" => "2010-01-01" )
351
351
352
352
example [ "details" ] [ "change_history" ] = [
0 commit comments