diff --git a/spec/models/scheme_spec.rb b/spec/models/scheme_spec.rb index da8b580b6..8b4b4b6f2 100644 --- a/spec/models/scheme_spec.rb +++ b/spec/models/scheme_spec.rb @@ -217,7 +217,7 @@ RSpec.describe Scheme, type: :model do context "when the owning organisation is set as a non-stock-owning organisation" do it "throws the correct validation error" do - expect { scheme.update!({ owning_organisation_id: non_stock_owning_org.id }) }.to raise_error(ActiveRecord::RecordInvalid, /#{I18n.t("validations.scheme.owning_organisation.does_not_own_stock")}/) + expect { scheme.update!({ owning_organisation_id: non_stock_owning_org.id }) }.to raise_error(ActiveRecord::RecordInvalid, /Enter an organisation that owns housing stock/) end end end diff --git a/spec/requests/schemes_controller_spec.rb b/spec/requests/schemes_controller_spec.rb index 623b9652d..49ba22321 100644 --- a/spec/requests/schemes_controller_spec.rb +++ b/spec/requests/schemes_controller_spec.rb @@ -611,7 +611,7 @@ RSpec.describe SchemesController, type: :request do it "displays the new page with an error message" do post "/schemes", params: params expect(response).to have_http_status(:unprocessable_entity) - expect(page).to have_content(I18n.t("validations.scheme.owning_organisation.does_not_own_stock")) + expect(page).to have_content("Enter an organisation that owns housing stock") end end end