Skip to content

Commit cf6cfe4

Browse files
committed
Change factory and seed to declaration_markdown
1 parent 4b3b3d3 commit cf6cfe4

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

db/seeds.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@
210210
),
211211
],
212212
question_section_completed: true,
213-
declaration_text: "",
213+
declaration_markdown: "",
214214
declaration_section_completed: true,
215215
privacy_policy_url: "https://www.gov.uk/help/privacy-notice",
216216
submission_email:,
@@ -234,7 +234,7 @@
234234
),
235235
],
236236
question_section_completed: true,
237-
declaration_text: "",
237+
declaration_markdown: "",
238238
declaration_section_completed: true,
239239
privacy_policy_url: "https://www.gov.uk/help/privacy-notice",
240240
submission_email:,
@@ -311,7 +311,7 @@
311311
),
312312
],
313313
question_section_completed: true,
314-
declaration_text: "",
314+
declaration_markdown: "",
315315
declaration_section_completed: true,
316316
privacy_policy_url: "https://www.gov.uk/help/privacy-notice",
317317
submission_email:,
@@ -383,7 +383,7 @@
383383
),
384384
],
385385
question_section_completed: true,
386-
declaration_text: "",
386+
declaration_markdown: "",
387387
declaration_section_completed: true,
388388
privacy_policy_url: "https://www.gov.uk/help/privacy-notice",
389389
submission_email:,
@@ -444,8 +444,8 @@
444444
),
445445
],
446446
question_section_completed: true,
447-
declaration_text: "",
448-
declaration_text_cy: "",
447+
declaration_markdown: "",
448+
declaration_markdown_cy: "",
449449
declaration_section_completed: true,
450450
privacy_policy_url: "https://www.gov.uk/help/welsh-privacy-notice",
451451
privacy_policy_url_cy: "https://www.gov.uk/help/welsh-privacy-notice",

spec/models/form_spec.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@
264264
support_phone
265265
support_url
266266
support_url_text
267-
declaration_text
267+
declaration_markdown
268268
what_happens_next_markdown
269269
]
270270
end
@@ -1296,7 +1296,7 @@
12961296
let!(:page) { create(:page) }
12971297
let(:welsh_attributes) do
12981298
{
1299-
declaration_text: "cy declaration",
1299+
declaration_markdown: "cy declaration",
13001300
payment_url: "https://cy.example.com",
13011301
support_email: "cy@example.com",
13021302
support_phone: "cy phone",
@@ -1382,10 +1382,10 @@
13821382

13831383
context "when the English attributes are present" do
13841384
before do
1385-
form.declaration_text = "en declaration"
1385+
form.declaration_markdown = "en declaration"
13861386
form.payment_url = "https://en.example.com"
13871387

1388-
form.declaration_text_cy = "cy declaration"
1388+
form.declaration_markdown_cy = "cy declaration"
13891389
form.payment_url_cy = "https://cy.example.com"
13901390

13911391
form.save!
@@ -1394,7 +1394,7 @@
13941394
it "does not clear the Welsh translations" do
13951395
form.normalise_welsh!
13961396
form.reload
1397-
expect(form.declaration_text_cy).to eq("cy declaration")
1397+
expect(form.declaration_markdown_cy).to eq("cy declaration")
13981398
expect(form.payment_url_cy).to eq("https://cy.example.com")
13991399
end
14001400
end

0 commit comments

Comments
 (0)