Browse Source

testing not being signed in on support pages

pull/648/head
JG 3 years ago
parent
commit
ea6d51ee2d
  1. 6
      spec/requests/schemes_controller_spec.rb

6
spec/requests/schemes_controller_spec.rb

@ -8,6 +8,12 @@ RSpec.describe SchemesController, type: :request do
let!(:schemes) { FactoryBot.create_list(:scheme, 5) } let!(:schemes) { FactoryBot.create_list(:scheme, 5) }
describe "#index" do describe "#index" do
context "when not signed in" do
it "redirects to the sign in page" do
get "/supported-housing"
expect(response).to redirect_to("/account/sign-in")
end
end
context "when signed in as a support user" do context "when signed in as a support user" do
before do before do
allow(user).to receive(:need_two_factor_authentication?).and_return(false) allow(user).to receive(:need_two_factor_authentication?).and_return(false)

Loading…
Cancel
Save