1 changed files with 22 additions and 0 deletions
@ -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…
Reference in new issue