From 2e32567a8b02e5d13f99716897783db5f3b158c3 Mon Sep 17 00:00:00 2001 From: Sam Seed Date: Thu, 5 Jan 2023 14:26:31 +0000 Subject: [PATCH] lint --- .../form/lettings/questions/managing_organisation_spec.rb | 2 +- spec/models/form/lettings/questions/stock_owner_spec.rb | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/spec/models/form/lettings/questions/managing_organisation_spec.rb b/spec/models/form/lettings/questions/managing_organisation_spec.rb index 9130f8a93..fcab113cb 100644 --- a/spec/models/form/lettings/questions/managing_organisation_spec.rb +++ b/spec/models/form/lettings/questions/managing_organisation_spec.rb @@ -117,7 +117,7 @@ RSpec.describe Form::Lettings::Questions::ManagingOrganisation, type: :model do context "when the owning-managing organisation relationship is deleted" do let(:user) { create(:user, :support) } - + let(:owning_org) { create(:organisation, name: "Owning org", holds_own_stock: true) } let(:managing_org) { create(:organisation, name: "Managing org", holds_own_stock: false) } let!(:org_rel) { create(:organisation_relationship, parent_organisation: owning_org, child_organisation: managing_org) } diff --git a/spec/models/form/lettings/questions/stock_owner_spec.rb b/spec/models/form/lettings/questions/stock_owner_spec.rb index 8babebbd7..691ed2c18 100644 --- a/spec/models/form/lettings/questions/stock_owner_spec.rb +++ b/spec/models/form/lettings/questions/stock_owner_spec.rb @@ -56,7 +56,7 @@ RSpec.describe Form::Lettings::Questions::StockOwner, type: :model do "" => "Select an option", owning_org_1.id => "Owning org 1", user.organisation.id => "User org (Your organisation)", - owning_org_2.id => "Owning org 2" + owning_org_2.id => "Owning org 2", } end @@ -70,9 +70,10 @@ RSpec.describe Form::Lettings::Questions::StockOwner, type: :model do { "" => "Select an option", user.organisation.id => "User org (Your organisation)", - owning_org_2.id => "Owning org 2" + owning_org_2.id => "Owning org 2", } end + it "doesn't remove the housing provider from the list of allowed housing providers" do log.update!(owning_organisation: owning_org_2) expect(question.displayed_answer_options(log, user)).to eq(options) @@ -87,7 +88,7 @@ RSpec.describe Form::Lettings::Questions::StockOwner, type: :model do { "" => "Select an option", owning_org_1.id => "Owning org 1", - owning_org_2.id => "Owning org 2" + owning_org_2.id => "Owning org 2", } end