From 960e507644fc48202f64001c1fa6b284e8cbfeee Mon Sep 17 00:00:00 2001 From: Sam Seed Date: Tue, 17 Jan 2023 15:18:34 +0000 Subject: [PATCH] test: change let! to let where possible in spec/models/form/lettings/questions/stock_owner_spec.rb --- .../form/lettings/questions/stock_owner_spec.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/models/form/lettings/questions/stock_owner_spec.rb b/spec/models/form/lettings/questions/stock_owner_spec.rb index 691ed2c18..ea97a7e41 100644 --- a/spec/models/form/lettings/questions/stock_owner_spec.rb +++ b/spec/models/form/lettings/questions/stock_owner_spec.rb @@ -43,12 +43,12 @@ RSpec.describe Form::Lettings::Questions::StockOwner, type: :model do end context "when user is not support" do - let!(:user) { create(:user, :data_coordinator, organisation: create(:organisation, name: "User org")) } + let(:user) { create(:user, :data_coordinator, organisation: create(:organisation, name: "User org")) } - let!(:owning_org_1) { create(:organisation, name: "Owning org 1") } - let!(:owning_org_2) { create(:organisation, name: "Owning org 2") } + let(:owning_org_1) { create(:organisation, name: "Owning org 1") } + let(:owning_org_2) { create(:organisation, name: "Owning org 2") } let!(:org_rel) { create(:organisation_relationship, child_organisation: user.organisation, parent_organisation: owning_org_2) } - let!(:log) { create(:lettings_log, owning_organisation: owning_org_1) } + let(:log) { create(:lettings_log, owning_organisation: owning_org_1) } context "when user's org owns stock" do let(:options) do @@ -100,9 +100,9 @@ RSpec.describe Form::Lettings::Questions::StockOwner, type: :model do end context "when user is support" do - let!(:user) { create(:user, :support) } + let(:user) { create(:user, :support) } - let!(:log) { create(:lettings_log) } + let(:log) { create(:lettings_log) } let(:expected_opts) do Organisation.all.each_with_object(options) do |organisation, hsh|