|
|
@ -135,9 +135,7 @@ RSpec.describe FormController, type: :request do |
|
|
|
case_log: { |
|
|
|
case_log: { |
|
|
|
page: "accessibility_requirements", |
|
|
|
page: "accessibility_requirements", |
|
|
|
accessibility_requirements: |
|
|
|
accessibility_requirements: |
|
|
|
%w[ housingneeds_a |
|
|
|
%w[housingneeds_b], |
|
|
|
housingneeds_b |
|
|
|
|
|
|
|
housingneeds_c], |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
end |
|
|
|
end |
|
|
@ -156,16 +154,13 @@ RSpec.describe FormController, type: :request do |
|
|
|
post "/logs/#{case_log.id}/form", params: case_log_form_params |
|
|
|
post "/logs/#{case_log.id}/form", params: case_log_form_params |
|
|
|
case_log.reload |
|
|
|
case_log.reload |
|
|
|
|
|
|
|
|
|
|
|
expect(case_log.housingneeds_a).to eq("Yes") |
|
|
|
|
|
|
|
expect(case_log.housingneeds_b).to eq("Yes") |
|
|
|
expect(case_log.housingneeds_b).to eq("Yes") |
|
|
|
expect(case_log.housingneeds_c).to eq("Yes") |
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
it "sets previously submitted items to false when resubmitted with new values" do |
|
|
|
it "sets previously submitted items to false when resubmitted with new values" do |
|
|
|
post "/logs/#{case_log.id}/form", params: new_case_log_form_params |
|
|
|
post "/logs/#{case_log.id}/form", params: new_case_log_form_params |
|
|
|
case_log.reload |
|
|
|
case_log.reload |
|
|
|
|
|
|
|
|
|
|
|
expect(case_log.housingneeds_a).to eq("No") |
|
|
|
|
|
|
|
expect(case_log.housingneeds_b).to eq("No") |
|
|
|
expect(case_log.housingneeds_b).to eq("No") |
|
|
|
expect(case_log.housingneeds_c).to eq("Yes") |
|
|
|
expect(case_log.housingneeds_c).to eq("Yes") |
|
|
|
end |
|
|
|
end |
|
|
@ -179,8 +174,7 @@ RSpec.describe FormController, type: :request do |
|
|
|
page: "accessibility_requirements", |
|
|
|
page: "accessibility_requirements", |
|
|
|
accessibility_requirements: |
|
|
|
accessibility_requirements: |
|
|
|
%w[ housingneeds_a |
|
|
|
%w[ housingneeds_a |
|
|
|
housingneeds_b |
|
|
|
housingneeds_f], |
|
|
|
housingneeds_c], |
|
|
|
|
|
|
|
tenant_code: tenant_code, |
|
|
|
tenant_code: tenant_code, |
|
|
|
}, |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
@ -213,8 +207,7 @@ RSpec.describe FormController, type: :request do |
|
|
|
case_log.reload |
|
|
|
case_log.reload |
|
|
|
|
|
|
|
|
|
|
|
expect(case_log.housingneeds_a).to eq("Yes") |
|
|
|
expect(case_log.housingneeds_a).to eq("Yes") |
|
|
|
expect(case_log.housingneeds_b).to eq("Yes") |
|
|
|
expect(case_log.housingneeds_f).to eq("Yes") |
|
|
|
expect(case_log.housingneeds_c).to eq("Yes") |
|
|
|
|
|
|
|
expect(case_log.tenant_code).to eq(tenant_code) |
|
|
|
expect(case_log.tenant_code).to eq(tenant_code) |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|