From aa3e592a6b4c2964205bb0027923b9fafad92f85 Mon Sep 17 00:00:00 2001 From: natdeanlewissoftwire Date: Wed, 26 Oct 2022 17:38:53 +0100 Subject: [PATCH] tests: add initial test --- spec/requests/organisations_controller_spec.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/spec/requests/organisations_controller_spec.rb b/spec/requests/organisations_controller_spec.rb index 63c629a97..8e5ffc25f 100644 --- a/spec/requests/organisations_controller_spec.rb +++ b/spec/requests/organisations_controller_spec.rb @@ -321,6 +321,16 @@ RSpec.describe OrganisationsController, type: :request do end end + context "when adding a housing provider" do + before do + get "/organisations/#{organisation.id}/housing-providers/add", headers:, params: {} + end + + it "has the correct header" do + expect(response.body).to include("What is the name of your housing provider?") + end + end + context "with an organisation that are not in scope for the user, i.e. that they do not belong to" do before do get "/organisations/#{unauthorised_organisation.id}/housing-providers", headers:, params: {}