Browse Source

lint

fix-remove-attr-accessors-from-questions-in-cldc-1723
Sam Seed 2 years ago
parent
commit
2e32567a8b
  1. 2
      spec/models/form/lettings/questions/managing_organisation_spec.rb
  2. 7
      spec/models/form/lettings/questions/stock_owner_spec.rb

2
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) }

7
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

Loading…
Cancel
Save