From 37eb1238a8d8768f5707deb3dec700e2bc87750c Mon Sep 17 00:00:00 2001 From: Kat <54268893+kosiakkatrina@users.noreply.github.com> Date: Mon, 2 Dec 2024 09:44:50 +0000 Subject: [PATCH] Update some request specs --- spec/requests/organisations_controller_spec.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/spec/requests/organisations_controller_spec.rb b/spec/requests/organisations_controller_spec.rb index ae3297d59..b640264e5 100644 --- a/spec/requests/organisations_controller_spec.rb +++ b/spec/requests/organisations_controller_spec.rb @@ -1555,7 +1555,10 @@ RSpec.describe OrganisationsController, type: :request do let(:total_organisations_count) { Organisation.all.count } before do - create_list(:organisation, 25) + build_list(:organisation, 25) do |organisation, index| + organisation.name = "Organisation #{index}" + organisation.save! + end get "/organisations" end @@ -1644,7 +1647,10 @@ RSpec.describe OrganisationsController, type: :request do let(:search_param) { "MHCLG" } before do - create_list(:organisation, 27, name: "MHCLG") + build_list(:organisation, 27) do |organisation, index| + organisation.name = "MHCLG #{index}" + organisation.save! + end get "/organisations?search=#{search_param}" end