Skip to content

Commit 941a008

Browse files
author
Ben Thorner
committed
Linting auto-correct
1 parent fc9016e commit 941a008

6 files changed

+77
-77
lines changed

test/components/important_metadata_test.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def component_name
1818
render_component(
1919
title: "The release date has been changed",
2020
items: {
21-
"Release Date": "14 October 2016",
21+
"Release Date": "14 October 2016",
2222
},
2323
)
2424

test/presenters/content_item/parts_test.rb

+17-17
Original file line numberDiff line numberDiff line change
@@ -215,22 +215,22 @@ def content_item
215215
end
216216

217217
assert_equal @parts.parts_navigation, [
218-
[
219-
"first-title", "<a class=\"govuk-link\" data-track-category=\"contentsClicked\" "\
220-
"data-track-action=\"content_item 2\" data-track-label=\"/base-path/second-slug\" "\
221-
"data-track-options=\"{&quot;dimension29&quot;:&quot;second-title&quot;}\" "\
222-
"href=\"/base-path/second-slug\">second-title</a>"
223-
],
224-
[
225-
"<a class=\"govuk-link\" data-track-category=\"contentsClicked\" data-track-action=\"content_item 3\" "\
226-
"data-track-label=\"/base-path/third-slug\" "\
227-
"data-track-options=\"{&quot;dimension29&quot;:&quot;third-title&quot;}\" "\
228-
"href=\"/base-path/third-slug\">third-title</a>",
229-
"<a class=\"govuk-link\" data-track-category=\"contentsClicked\" data-track-action=\"content_item 4\" "\
230-
"data-track-label=\"/base-path/fourth-slug\" "\
231-
"data-track-options=\"{&quot;dimension29&quot;:&quot;fourth-title&quot;}\" "\
232-
"href=\"/base-path/fourth-slug\">fourth-title</a>",
233-
],
234-
]
218+
[
219+
"first-title", "<a class=\"govuk-link\" data-track-category=\"contentsClicked\" "\
220+
"data-track-action=\"content_item 2\" data-track-label=\"/base-path/second-slug\" "\
221+
"data-track-options=\"{&quot;dimension29&quot;:&quot;second-title&quot;}\" "\
222+
"href=\"/base-path/second-slug\">second-title</a>"
223+
],
224+
[
225+
"<a class=\"govuk-link\" data-track-category=\"contentsClicked\" data-track-action=\"content_item 3\" "\
226+
"data-track-label=\"/base-path/third-slug\" "\
227+
"data-track-options=\"{&quot;dimension29&quot;:&quot;third-title&quot;}\" "\
228+
"href=\"/base-path/third-slug\">third-title</a>",
229+
"<a class=\"govuk-link\" data-track-category=\"contentsClicked\" data-track-action=\"content_item 4\" "\
230+
"data-track-label=\"/base-path/fourth-slug\" "\
231+
"data-track-options=\"{&quot;dimension29&quot;:&quot;fourth-title&quot;}\" "\
232+
"href=\"/base-path/fourth-slug\">fourth-title</a>",
233+
],
234+
]
235235
end
236236
end

test/presenters/specialist_document_presenter_test.rb

+48-48
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ class PresentedSpecialistDocument < SpecialistDocumentTestCase
8282
test "has title without context" do
8383
assert presented_item("aaib-reports").is_a?(ContentItem::TitleAndContext)
8484
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",
8888

89-
}
89+
}
9090

9191
assert_equal title_component_params, presented_item("aaib-reports").title_and_context
9292
end
@@ -215,17 +215,17 @@ def example_facet(overrides = {})
215215

216216
test "ignores facets if valid key but set to an empty string" do
217217
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+
],
229229
"facet-key" => "",
230230
"date-facet" => "")
231231

@@ -283,27 +283,27 @@ def example_facet(overrides = {})
283283

284284
test "puts date facets together and before text facets" do
285285
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+
],
307307
"facet-key" => "Text",
308308
"first-date-facet" => "2010-01-01",
309309
"second-date-facet" => "2010-02-03",
@@ -327,12 +327,12 @@ def example_facet(overrides = {})
327327

328328
test "omits first_published_at facet values from `other` section of component parameters to avoid duplicates" do
329329
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+
]
336336
example = example_with_finder_facets(facets, "first_published_at" => "2010-01-01")
337337

338338
presented = present_example(example)
@@ -341,12 +341,12 @@ def example_facet(overrides = {})
341341

342342
test "uses first published date in facets as canonical publish date if provided" do
343343
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+
]
350350
example = example_with_finder_facets(facets, "first_published_at" => "2010-01-01")
351351

352352
example["details"]["change_history"] = [

test/presenters/speech_presenter_test.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def example_schema_name
9191
"<a class=\"govuk-link\" href=\"/government/organisations/prime-ministers-office-10-downing-street\">Prime Minister&#39;s Office, 10 Downing Street</a>",
9292
"<a class=\"govuk-link\" href=\"/government/organisations/cabinet-office\">Cabinet Office</a>",
9393
"Her Majesty the Queen",
94-
], presented_item(example_schema_name).from
94+
], presented_item(example_schema_name).from
9595
end
9696
end
9797
end

test/presenters/topical_event_about_page_presenter_test.rb

+7-7
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ def schema_name
1414

1515
test "presents a list of contents extracted from headings in the body" do
1616
assert_equal [
17-
{ text: "Response in the UK", id: "response-in-the-uk", href: "#response-in-the-uk" },
18-
{ text: "Response in Africa", id: "response-in-africa", href: "#response-in-africa" },
19-
{ text: "Advice for travellers", id: "advice-for-travellers", href: "#advice-for-travellers" },
20-
{ text: "Advice for medics", id: "advice-for-medics", href: "#advice-for-medics" },
21-
{ text: "Advice for aid workers", id: "advice-for-aid-workers", href: "#advice-for-aid-workers" },
22-
{ text: "How you can help", id: "how-you-can-help", href: "#how-you-can-help" },
23-
], presented_item.contents
17+
{ text: "Response in the UK", id: "response-in-the-uk", href: "#response-in-the-uk" },
18+
{ text: "Response in Africa", id: "response-in-africa", href: "#response-in-africa" },
19+
{ text: "Advice for travellers", id: "advice-for-travellers", href: "#advice-for-travellers" },
20+
{ text: "Advice for medics", id: "advice-for-medics", href: "#advice-for-medics" },
21+
{ text: "Advice for aid workers", id: "advice-for-aid-workers", href: "#advice-for-aid-workers" },
22+
{ text: "How you can help", id: "how-you-can-help", href: "#how-you-can-help" },
23+
], presented_item.contents
2424
end
2525

2626
test "presents no contents when no headings in the body" do

test/services/world_location_base_path_test.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ class WorldLocationBasePathWithoutBasePath < ActiveSupport::TestCase
2121

2222
class WorldLocationBasePathForExceptionalCase < ActiveSupport::TestCase
2323
{
24-
"Democratic Republic of Congo" => "democratic-republic-of-congo",
25-
"South Georgia and the South Sandwich Islands" => "south-georgia-and-the-south-sandwich-islands",
26-
"St Pierre & Miquelon" => "st-pierre-miquelon",
24+
"Democratic Republic of Congo" => "democratic-republic-of-congo",
25+
"South Georgia and the South Sandwich Islands" => "south-georgia-and-the-south-sandwich-islands",
26+
"St Pierre & Miquelon" => "st-pierre-miquelon",
2727
}.each do |title, expected_slug|
2828
test "returns /world/#{expected_slug}/news" do
2929
link = {

0 commit comments

Comments
 (0)