diff --git a/spec/requests/organisations_controller_spec.rb b/spec/requests/organisations_controller_spec.rb index d843b6f3e..b80192e6d 100644 --- a/spec/requests/organisations_controller_spec.rb +++ b/spec/requests/organisations_controller_spec.rb @@ -1,7 +1,7 @@ require "rails_helper" RSpec.describe OrganisationsController, type: :request do - let(:organisation) { user.organisation } + let!(:organisation) { user.organisation } let!(:unauthorised_organisation) { FactoryBot.create(:organisation) } let(:headers) { { "Accept" => "text/html" } } let(:page) { Capybara::Node::Simple.new(response.body) }