From 4349ddaecf97cc4284610531b04fa9bda745658a Mon Sep 17 00:00:00 2001 From: Nat Dean-Lewis Date: Tue, 14 Apr 2026 15:31:07 +0100 Subject: [PATCH] CLDC-4400: update spec --- .../questions/buyer_still_serving_spec.rb | 27 ++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/spec/models/form/sales/questions/buyer_still_serving_spec.rb b/spec/models/form/sales/questions/buyer_still_serving_spec.rb index 4b89879f6..d9222fae2 100644 --- a/spec/models/form/sales/questions/buyer_still_serving_spec.rb +++ b/spec/models/form/sales/questions/buyer_still_serving_spec.rb @@ -32,10 +32,21 @@ RSpec.describe Form::Sales::Questions::BuyerStillServing, type: :model do it "has the correct answer_options" do expect(question.answer_options).to eq({ "4" => { "value" => "Yes" }, - "5" => { "value" => "No" }, - "6" => { "value" => "Buyer prefers not to say" }, + "5" => { "value" => "No - they left up to and including 2 years ago" }, + "6" => { "value" => "No - they left more than 2 years ago" }, "divider" => { "value" => true }, - "7" => { "value" => "Don’t know" }, + "9" => { "value" => "Don’t know" }, + "10" => { "value" => "No" }, + }) + end + + it "has the correct displayed_answer_options" do + expect(question.displayed_answer_options(nil)).to eq({ + "4" => { "value" => "Yes" }, + "5" => { "value" => "No - they left up to and including 2 years ago" }, + "6" => { "value" => "No - they left more than 2 years ago" }, + "divider" => { "value" => true }, + "9" => { "value" => "Don’t know" }, }) end end @@ -52,5 +63,15 @@ RSpec.describe Form::Sales::Questions::BuyerStillServing, type: :model do "9" => { "value" => "Don’t know" }, }) end + + it "has the correct displayed_answer_options" do + expect(question.displayed_answer_options(nil)).to eq({ + "4" => { "value" => "Yes" }, + "5" => { "value" => "No - they left up to and including 2 years ago" }, + "6" => { "value" => "No - they left more than 2 years ago" }, + "divider" => { "value" => true }, + "9" => { "value" => "Don’t know" }, + }) + end end end