Skip to content

Commit 257277f

Browse files
committed
Remove content item examples
1 parent 503a774 commit 257277f

7 files changed

Lines changed: 0 additions & 122 deletions

spec/lib/chunking/content_item_parsing/body_content_array_parser_spec.rb

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,4 @@
11
RSpec.describe Chunking::ContentItemParsing::BodyContentArrayParser do
2-
include ContentItemParserExamples
3-
it_behaves_like "a chunking content item parser" do
4-
let(:body) do
5-
[
6-
{
7-
"content_type" => "text/html",
8-
"content" => "<p>Content</p>",
9-
},
10-
{
11-
"content_type" => "text/govspeak",
12-
"content" => "Content",
13-
},
14-
]
15-
end
16-
17-
let(:content_item) { build(:notification_content_item, schema_name:, body:) }
18-
end
19-
202
describe ".call" do
213
it "raises an error if there is not a body field in the details hash" do
224
content_item = build(:notification_content_item, details: {}, ensure_valid: false)

spec/lib/chunking/content_item_parsing/body_content_parser_spec.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
RSpec.describe Chunking::ContentItemParsing::BodyContentParser do
2-
include ContentItemParserExamples
3-
4-
it_behaves_like "a chunking content item parser" do
5-
let(:content_item) { build(:notification_content_item, body: "<p>Content</p>", schema_name:) }
6-
end
7-
82
describe ".call" do
93
it "returns chunks for a HTML body field" do
104
body = '<h2 id="heading-1">Heading 1</h2><p>Content 1</p><h2 id="heading-2">Heading 2</h2><p>Content 2</p>'

spec/lib/chunking/content_item_parsing/parts_content_parser_spec.rb

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,4 @@
11
RSpec.describe Chunking::ContentItemParsing::PartsContentParser do
2-
include ContentItemParserExamples
3-
4-
it_behaves_like "a chunking content item parser" do
5-
let(:content_item) do
6-
build(
7-
:notification_content_item,
8-
schema_name:,
9-
details_merge: {
10-
"parts" => [
11-
"title" => "Part 1",
12-
"slug" => "slug-1",
13-
"body" => [
14-
{
15-
"content_type" => "text/html",
16-
"content" => "<p>Content</p>",
17-
},
18-
],
19-
],
20-
},
21-
)
22-
end
23-
end
24-
252
describe ".call" do
263
it "converts the array of parts into an array of chunks" do
274
parts = [

spec/lib/chunking/content_item_parsing/step_by_step_nav_parser_spec.rb

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,4 @@
11
RSpec.describe Chunking::ContentItemParsing::StepByStepNavParser do
2-
include ContentItemParserExamples
3-
4-
it_behaves_like "a chunking content item parser" do
5-
let(:content_item) do
6-
build(
7-
:notification_content_item,
8-
schema_name: "step_by_step_nav",
9-
details:,
10-
)
11-
end
12-
end
132
let(:details) do
143
{
154
"step_by_step_nav" => {

spec/lib/chunking/content_item_parsing/transaction_parser_spec.rb

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,4 @@
11
RSpec.describe Chunking::ContentItemParsing::TransactionParser do
2-
include ContentItemParserExamples
3-
4-
it_behaves_like "a chunking content item parser" do
5-
let(:content_item) do
6-
build(
7-
:notification_content_item,
8-
schema_name:,
9-
details: {
10-
"introductory_paragraph" => [
11-
{
12-
"content_type" => "text/html",
13-
"content" => "<p>Content/p>",
14-
},
15-
],
16-
},
17-
)
18-
end
19-
end
20-
212
describe ".call" do
223
it "uses the introductory_paragraph, more_information, other_ways_to_apply and what_you_need_to_know fields for chunks" do
234
details = {

spec/lib/chunking/content_item_parsing/travel_guide_parser_spec.rb

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,4 @@
11
RSpec.describe Chunking::ContentItemParsing::TravelGuideParser do
2-
include ContentItemParserExamples
3-
4-
it_behaves_like "a chunking content item parser" do
5-
let(:content_item) do
6-
build(
7-
:notification_content_item,
8-
schema_name:,
9-
details_merge: {
10-
"alert_status" => [],
11-
"parts" => [
12-
"title" => "Part 1",
13-
"slug" => "slug-1",
14-
"body" => [
15-
{
16-
"content_type" => "text/html",
17-
"content" => "<p>Content</p>",
18-
},
19-
],
20-
],
21-
},
22-
)
23-
end
24-
end
25-
262
describe ".call" do
273
let(:parts) do
284
[

spec/support/content_item_parser_examples.rb

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)