From 5b8a01b0697a598a6b7ecb8ce8345ef5eaa21554 Mon Sep 17 00:00:00 2001 From: Aaron Spencer Date: Tue, 4 Jul 2023 16:43:59 +0100 Subject: [PATCH] CLDC-1863: removed test of no longer relevant behaviour --- spec/features/lettings_log_spec.rb | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/spec/features/lettings_log_spec.rb b/spec/features/lettings_log_spec.rb index 2e83b669c..29616a485 100644 --- a/spec/features/lettings_log_spec.rb +++ b/spec/features/lettings_log_spec.rb @@ -132,30 +132,6 @@ RSpec.describe "Lettings Log Features" do end context "when the owning organisation question is answered" do - context "and the owning organisation doesn't hold stock" do - let(:managing_org) { create(:organisation, name: "Managing org") } - let!(:org_rel) { create(:organisation_relationship, parent_organisation: support_user.organisation, child_organisation: managing_org) } - - before do - support_user.organisation.update!(holds_own_stock: false) - end - - it "shows the managing organisation question" do - visit("/lettings-logs") - click_button("Create a new lettings log") - click_link("Set up this lettings log") - log_id = page.current_path.scan(/\d/).join - select(support_user.organisation.name, from: "lettings-log-owning-organisation-id-field") - click_button("Save and continue") - expect(page).to have_current_path("/lettings-logs/#{log_id}/managing-organisation") - select(managing_org.name, from: "lettings-log-managing-organisation-id-field") - click_button("Save and continue") - visit("lettings-logs/#{log_id}/setup/check-answers") - expect(page).to have_content("Managing agent Managing org", normalize_ws: true) - expect(support_user.organisation.managing_agents).to eq([org_rel.child_organisation]) - end - end - context "and the owning organisation does hold stock" do before do support_user.organisation.update!(holds_own_stock: true)