From 9e3007c7b710c7bd05bf6be7ca819659199dbef9 Mon Sep 17 00:00:00 2001 From: JG Date: Mon, 13 Jun 2022 13:02:38 +0100 Subject: [PATCH] testing I can see scheme details on the page --- spec/requests/schemes_controller_spec.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/spec/requests/schemes_controller_spec.rb b/spec/requests/schemes_controller_spec.rb index 373676830..f69b703b9 100644 --- a/spec/requests/schemes_controller_spec.rb +++ b/spec/requests/schemes_controller_spec.rb @@ -184,5 +184,20 @@ RSpec.describe SchemesController, type: :request do expect(response).to have_http_status(:unauthorized) end end + + context "when signed in as a support user" do + before do + allow(user).to receive(:need_two_factor_authentication?).and_return(false) + sign_in user + get "/supported-housing/#{specific_scheme.id}" + end + + it "has page heading" do + expect(page).to have_content(specific_scheme.code) + expect(page).to have_content(specific_scheme.service_name) + expect(page).to have_content(specific_scheme.organisation.name) + expect(page).to have_content(specific_scheme.organisation.sensitive) + end + end end end