diff --git a/app/controllers/schemes_controller.rb b/app/controllers/schemes_controller.rb index 4e0cac8ae..d23c3a8ee 100644 --- a/app/controllers/schemes_controller.rb +++ b/app/controllers/schemes_controller.rb @@ -94,7 +94,7 @@ class SchemesController < ApplicationController if @scheme.errors.empty? && @scheme.save redirect_to scheme_primary_client_group_path(@scheme) else - if @scheme.errors.any? { |error| error.attribute == :owning_organisation} + if @scheme.errors.any? { |error| error.attribute == :owning_organisation } @scheme.errors.add(:owning_organisation_id, message: @scheme.errors[:organisation]) @scheme.errors.delete(:owning_organisation) end diff --git a/spec/features/schemes_spec.rb b/spec/features/schemes_spec.rb index 9a39b9283..20a7a893b 100644 --- a/spec/features/schemes_spec.rb +++ b/spec/features/schemes_spec.rb @@ -605,7 +605,6 @@ RSpec.describe "Schemes scheme Features" do context "when I fill in scheme details indicating that supported services provided by a different organisation and I press save I see primary client group section" do let(:scheme) { Scheme.first } - let!(:another_organisation) { FactoryBot.create(:organisation, name: "Another Org") } before do fill_in_and_save_scheme_details({ "housing_stock_owners" => "Another registered stock owner" }) diff --git a/spec/requests/schemes_controller_spec.rb b/spec/requests/schemes_controller_spec.rb index 257ea6ec2..431270767 100644 --- a/spec/requests/schemes_controller_spec.rb +++ b/spec/requests/schemes_controller_spec.rb @@ -647,7 +647,7 @@ RSpec.describe SchemesController, type: :request do it "does not allow the scheme to be confirmed" do expect(response).to have_http_status(:unprocessable_entity) - expect(page).to have_content(I18n.t("activerecord.errors.models.scheme.attributes.arrangement_type.invalid")) + expect(page).to have_content(I18n.t("activerecord.errors.models.scheme.attributes.arrangement_type.invalid")) end end diff --git a/spec/services/imports/scheme_import_service_spec.rb b/spec/services/imports/scheme_import_service_spec.rb index ac31584c3..6a09abb2a 100644 --- a/spec/services/imports/scheme_import_service_spec.rb +++ b/spec/services/imports/scheme_import_service_spec.rb @@ -10,7 +10,6 @@ RSpec.describe Imports::SchemeImportService do let(:scheme_id) { "6d6d7618b58affe2a150a5ef2e9f4765fa6cd05d" } let!(:owning_org) { FactoryBot.create(:organisation, old_org_id: "7c5bd5fb549c09z2c55d9cb90d7ba84927e64618") } - let!(:managing_org) { FactoryBot.create(:organisation, old_visible_id: "456") } def open_file(directory, filename) File.open("#{directory}/#{filename}.xml")