Browse Source

spec for index schemes

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

22
spec/requests/schemes_controller_spec.rb

@ -0,0 +1,22 @@
require "rails_helper"
RSpec.describe SchemesController, type: :request do
let(:organisation) { user.organisation }
let(:headers) { { "Accept" => "text/html" } }
let(:page) { Capybara::Node::Simple.new(response.body) }
let(:user) { FactoryBot.create(:user, :data_coordinator) }
describe "#index" do
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", headers:, params:
end
it "shows the organisation list" do
expect(page).to have_content("Supported housing services")
end
end
end
end
Loading…
Cancel
Save