diff --git a/spec/helpers/organisations_helper_spec.rb b/spec/helpers/organisations_helper_spec.rb
index 9ebe12d1f..ea0d9b158 100644
--- a/spec/helpers/organisations_helper_spec.rb
+++ b/spec/helpers/organisations_helper_spec.rb
@@ -3,7 +3,7 @@ require "rails_helper"
RSpec.describe OrganisationsHelper do
include TagHelper
describe "display_organisation_attributes" do
- let(:organisation) { create(:organisation) }
+ let(:organisation) { create(:organisation, :la, :holds_own_stock, address_line1: "2 Marsham Street", address_line2: "London", postcode: "SW1P 4DF", housing_registration_no: 1234, organisation_rent_periods: []) }
it "has the correct values" do
expect(display_organisation_attributes(organisation)).to eq(
diff --git a/spec/helpers/tab_nav_helper_spec.rb b/spec/helpers/tab_nav_helper_spec.rb
index 4a2d13377..89f867775 100644
--- a/spec/helpers/tab_nav_helper_spec.rb
+++ b/spec/helpers/tab_nav_helper_spec.rb
@@ -15,7 +15,7 @@ RSpec.describe TabNavHelper do
describe "#org_cell" do
it "returns the users org name and role separated by a newline character" do
- expected_html = "MHCLG\nData provider"
+ expected_html = "#{organisation.name}\nData provider"
expect(org_cell(current_user)).to match(expected_html)
end
end
diff --git a/spec/requests/organisations_controller_spec.rb b/spec/requests/organisations_controller_spec.rb
index a91fb6d4e..c99ad3cfb 100644
--- a/spec/requests/organisations_controller_spec.rb
+++ b/spec/requests/organisations_controller_spec.rb
@@ -1431,7 +1431,7 @@ RSpec.describe OrganisationsController, type: :request do
end
context "when a search parameter is passed" do
- let!(:matching_user) { create(:user, organisation:, name: "joe", email: "matching@example.com") }
+ let!(:matching_user) { create(:user, organisation:, name: "abcdefghijklmnopqrstuvwxyz", email: "matching@example.com") }
let(:org_user_count) { User.where(organisation:).count }
before do
@@ -1439,7 +1439,7 @@ RSpec.describe OrganisationsController, type: :request do
end
context "when our search string matches case" do
- let(:search_param) { "joe" }
+ let(:search_param) { "abcdefghijklmnopqrstuvwxyz" }
it "returns only matching results" do
expect(page).to have_content(matching_user.name)
@@ -1459,7 +1459,7 @@ RSpec.describe OrganisationsController, type: :request do
end
context "when we need case insensitive search" do
- let(:search_param) { "Joe" }
+ let(:search_param) { "Abcdefghijklmnopqrstuvwxyz" }
it "returns only matching results" do
expect(page).to have_content(matching_user.name)