Skip to content

Commit 93769eb

Browse files
committed
Rename live form trait
The question mark on the trait doesn't make sense.
1 parent 3d456a5 commit 93769eb

11 files changed

+11
-11
lines changed

spec/factories/models/forms.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
s3_bucket_name { nil }
2424
s3_bucket_aws_account_id { nil }
2525

26-
trait :live? do
26+
trait :live do
2727
with_steps
2828
support_email { Faker::Internet.email(domain: "example.gov.uk") }
2929
what_happens_next_markdown { "We usually respond to applications within 10 working days." }

spec/factories/v2_form_document.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
what_happens_next_markdown { "We usually respond to applications within 10 working days." }
6666
end
6767

68-
trait :live? do
68+
trait :live do
6969
ready_for_live
7070
end
7171

spec/features/email_confirmation_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
feature "Email confirmation", type: :feature do
44
let(:steps) { [build(:v2_question_step, :with_text_settings, id: 1, routing_conditions: [], question_text:)] }
5-
let(:form) { build :v2_form_document, :live?, form_id: 1, name: "Apply for a juggling license", steps:, start_page: 1 }
5+
let(:form) { build :v2_form_document, :live, form_id: 1, name: "Apply for a juggling license", steps:, start_page: 1 }
66
let(:question_text) { Faker::Lorem.question }
77
let(:text_answer) { Faker::Lorem.sentence }
88

spec/features/fill_in_and_submit_form_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
feature "Fill in and submit a form", type: :feature do
44
let(:steps) { [build(:v2_question_step, :with_text_settings, id: 1, routing_conditions: [], question_text:)] }
5-
let(:form) { build :v2_form_document, :live?, form_id: 1, name: "Fill in this form", steps:, start_page: 1 }
5+
let(:form) { build :v2_form_document, :live, form_id: 1, name: "Fill in this form", steps:, start_page: 1 }
66
let(:question_text) { Faker::Lorem.question }
77
let(:answer_text) { "Answer text" }
88
let(:reference) { Faker::Alphanumeric.alphanumeric(number: 8).upcase }

spec/features/fill_in_and_submit_form_with_csv_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
build(:v2_selection_question_step, only_one_option: false, id: 2, question_text: "Skipped question", next_step_id: 3),
88
]
99
end
10-
let(:form) { build :v2_form_document, :live?, form_id: 1, name: "Fill in this form", steps:, start_page: steps.first.id, submission_type: "email", submssion_format: %w[csv] }
10+
let(:form) { build :v2_form_document, :live, form_id: 1, name: "Fill in this form", steps:, start_page: steps.first.id, submission_type: "email", submssion_format: %w[csv] }
1111
let(:reference) { Faker::Alphanumeric.alphanumeric(number: 8).upcase }
1212
let(:req_headers) { { "Accept" => "application/json" } }
1313

spec/features/fill_in_autocomplete_question_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
feature "Fill in and submit a form with an autocomplete question", type: :feature do
44
let(:steps) { [build(:v2_selection_question_step, id: 1, routing_conditions: [], question_text:, selection_options:)] }
5-
let(:form) { build :v2_form_document, :live?, form_id: 1, name: "Fill in this form", steps:, start_page: 1 }
5+
let(:form) { build :v2_form_document, :live, form_id: 1, name: "Fill in this form", steps:, start_page: 1 }
66
let(:selection_options) { Array.new(31).each_with_index.map { |_element, index| { name: "Answer #{index}", value: "Answer #{index}" } } }
77
let(:question_text) { Faker::Lorem.question }
88
let(:answer_text) { "Answer 1" }

spec/features/fill_in_file_upload_question_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
include ActiveJob::TestHelper
55

66
let(:steps) { [build(:v2_question_step, answer_type: "file", id: 1, routing_conditions: [], question_text:)] }
7-
let(:form) { build :v2_form_document, :live?, form_id: 1, name: "Fill in this form", steps:, start_page: 1 }
7+
let(:form) { build :v2_form_document, :live, form_id: 1, name: "Fill in this form", steps:, start_page: 1 }
88
let(:question_text) { Faker::Lorem.question }
99
let(:answer_text) { "Answer 1" }
1010
let(:reference) { Faker::Alphanumeric.alphanumeric(number: 8).upcase }

spec/features/fill_in_form_with_exit_page_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
feature "Fill in and submit a form with an exit page", type: :feature do
44
let(:routing_conditions) { [DataStruct.new(routing_page_id: 1, check_page_id: 1, answer_value: "Option 1", goto_page_id: nil, exit_page_heading: "This is an exit_page", exit_page_markdown: "This is the contents", validation_errors: [])] }
55
let(:steps) { [build(:v2_selection_question_step, id: 1, routing_conditions:, question_text:)] }
6-
let(:form) { build :v2_form_document, :live?, form_id: 1, name: "Fill in this form", steps:, start_page: 1 }
6+
let(:form) { build :v2_form_document, :live, form_id: 1, name: "Fill in this form", steps:, start_page: 1 }
77
let(:question_text) { Faker::Lorem.question }
88
let(:reference) { Faker::Alphanumeric.alphanumeric(number: 8).upcase }
99

spec/features/fill_in_single_repeatable_form_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
feature "Fill in and submit a form with a single repeatable question", type: :feature do
44
let(:steps) { [build(:v2_question_step, :with_repeatable, answer_type: "number", question_text:)] }
5-
let(:form) { build :v2_form_document, :live?, form_id: 42, name: "Form with repeating question", steps:, start_page: steps.first.id }
5+
let(:form) { build :v2_form_document, :live, form_id: 42, name: "Form with repeating question", steps:, start_page: steps.first.id }
66

77
let(:question_text) { Faker::Lorem.question }
88
let(:first_answer_text) { "99" }

spec/requests/forms/remove_file_controller_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
RSpec.describe Forms::RemoveFileController, type: :request do
44
let(:form_data) do
5-
build(:v2_form_document, :with_support, :live?,
5+
build(:v2_form_document, :with_support, :live,
66
form_id: 1,
77
start_page: 1,
88
privacy_policy_url: "http://www.example.gov.uk/privacy_policy",

0 commit comments

Comments
 (0)