Browse Source

Remove redundant tests

pull/1249/head
Kat 3 years ago
parent
commit
d426eed024
  1. 20
      spec/models/form/sales/questions/person_age_spec.rb
  2. 4
      spec/models/form/sales/questions/person_gender_identity_spec.rb
  3. 20
      spec/models/form/sales/questions/person_known_spec.rb
  4. 4
      spec/models/form/sales/questions/person_working_situation_spec.rb

20
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 },

4
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" },

20
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 }],

4
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" },

Loading…
Cancel
Save