From d426eed02443ff4eacf5ec2a38f759ae3462cf6e Mon Sep 17 00:00:00 2001 From: Kat Date: Thu, 2 Feb 2023 09:23:02 +0000 Subject: [PATCH] Remove redundant tests --- .../form/sales/questions/person_age_spec.rb | 20 ++++--------------- .../questions/person_gender_identity_spec.rb | 4 ---- .../form/sales/questions/person_known_spec.rb | 20 ++++--------------- .../person_working_situation_spec.rb | 4 ---- 4 files changed, 8 insertions(+), 40 deletions(-) diff --git a/spec/models/form/sales/questions/person_age_spec.rb b/spec/models/form/sales/questions/person_age_spec.rb index 30dcc8bcd..9f475f6b6 100644 --- a/spec/models/form/sales/questions/person_age_spec.rb +++ b/spec/models/form/sales/questions/person_age_spec.rb @@ -36,6 +36,10 @@ RSpec.describe Form::Sales::Questions::PersonAge, type: :model do expect(question.max).to eq(110) end + it "has the correct width" do + expect(question.width).to eq(3) + end + context "with person 2" do let(:person_index) { 2 } let(:question_id) { "age2" } @@ -48,10 +52,6 @@ RSpec.describe Form::Sales::Questions::PersonAge, type: :model do expect(question.check_answer_label).to eq("Person 2’s age") end - it "has the correct width" do - expect(question.width).to eq(3) - end - it "has the correct inferred check answers value" do expect(question.inferred_check_answers_value).to eq([{ "condition" => { "age2_known" => 1 }, @@ -76,10 +76,6 @@ RSpec.describe Form::Sales::Questions::PersonAge, type: :model do expect(question.check_answer_label).to eq("Person 3’s age") end - it "has the correct width" do - expect(question.width).to eq(3) - end - it "has the correct inferred check answers value" do expect(question.inferred_check_answers_value).to eq([{ "condition" => { "age3_known" => 1 }, @@ -104,10 +100,6 @@ RSpec.describe Form::Sales::Questions::PersonAge, type: :model do expect(question.check_answer_label).to eq("Person 4’s age") end - it "has the correct width" do - expect(question.width).to eq(3) - end - it "has the correct inferred check answers value" do expect(question.inferred_check_answers_value).to eq([{ "condition" => { "age4_known" => 1 }, @@ -132,10 +124,6 @@ RSpec.describe Form::Sales::Questions::PersonAge, type: :model do expect(question.check_answer_label).to eq("Person 5’s age") end - it "has the correct width" do - expect(question.width).to eq(3) - end - it "has the correct inferred check answers value" do expect(question.inferred_check_answers_value).to eq([{ "condition" => { "age5_known" => 1 }, diff --git a/spec/models/form/sales/questions/person_gender_identity_spec.rb b/spec/models/form/sales/questions/person_gender_identity_spec.rb index 3962142fb..0ae959e82 100644 --- a/spec/models/form/sales/questions/person_gender_identity_spec.rb +++ b/spec/models/form/sales/questions/person_gender_identity_spec.rb @@ -20,10 +20,6 @@ RSpec.describe Form::Sales::Questions::PersonGenderIdentity, type: :model do expect(question.derived?).to be false end - it "has expected check answers card number" do - expect(question.check_answers_card_number).to eq(2) - end - it "has the correct answer_options" do expect(question.answer_options).to eq({ "F" => { "value" => "Female" }, diff --git a/spec/models/form/sales/questions/person_known_spec.rb b/spec/models/form/sales/questions/person_known_spec.rb index 90f299d5a..d04f61203 100644 --- a/spec/models/form/sales/questions/person_known_spec.rb +++ b/spec/models/form/sales/questions/person_known_spec.rb @@ -27,6 +27,10 @@ RSpec.describe Form::Sales::Questions::PersonKnown, type: :model do }) end + it "has correct conditional for" do + expect(question.conditional_for).to be_nil + end + it "has the correct hint" do expect(question.hint_text).to be_nil end @@ -47,10 +51,6 @@ RSpec.describe Form::Sales::Questions::PersonKnown, type: :model do expect(question.check_answer_label).to eq("Details known for person 2?") end - it "has correct conditional for" do - expect(question.conditional_for).to be_nil - end - it "has the correct hidden_in_check_answers" do expect(question.hidden_in_check_answers).to eq( "depends_on" => [{ "details_known_2" => 1 }], @@ -78,10 +78,6 @@ RSpec.describe Form::Sales::Questions::PersonKnown, type: :model do expect(question.check_answer_label).to eq("Details known for person 3?") end - it "has correct conditional for" do - expect(question.conditional_for).to be_nil - end - it "has the correct hidden_in_check_answers" do expect(question.hidden_in_check_answers).to eq( "depends_on" => [{ "details_known_3" => 1 }], @@ -109,10 +105,6 @@ RSpec.describe Form::Sales::Questions::PersonKnown, type: :model do expect(question.check_answer_label).to eq("Details known for person 4?") end - it "has correct conditional for" do - expect(question.conditional_for).to be_nil - end - it "has the correct hidden_in_check_answers" do expect(question.hidden_in_check_answers).to eq( "depends_on" => [{ "details_known_4" => 1 }], @@ -140,10 +132,6 @@ RSpec.describe Form::Sales::Questions::PersonKnown, type: :model do expect(question.check_answer_label).to eq("Details known for person 5?") end - it "has correct conditional for" do - expect(question.conditional_for).to be_nil - end - it "has the correct hidden_in_check_answers" do expect(question.hidden_in_check_answers).to eq( "depends_on" => [{ "details_known_5" => 1 }], diff --git a/spec/models/form/sales/questions/person_working_situation_spec.rb b/spec/models/form/sales/questions/person_working_situation_spec.rb index a56f6f1aa..274d199c9 100644 --- a/spec/models/form/sales/questions/person_working_situation_spec.rb +++ b/spec/models/form/sales/questions/person_working_situation_spec.rb @@ -20,10 +20,6 @@ RSpec.describe Form::Sales::Questions::PersonWorkingSituation, type: :model do expect(question.derived?).to be false end - it "has expected check answers card number" do - expect(question.check_answers_card_number).to eq(2) - end - it "has the correct answer_options" do expect(question.answer_options).to eq({ "2" => { "value" => "Part-time - Less than 30 hours" },