Submit social housing lettings and sales data (CORE)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

19 lines
596 B

require "rails_helper"
RSpec.describe LogsController, type: :request do
describe "index" do
let(:user) { FactoryBot.create(:user) }
let(:page) { Capybara::Node::Simple.new(response.body) }
before do
sign_in user
FactoryBot.create_list(:lettings_log, 3, :completed, owning_organisation: user.organisation, created_by: user)
FactoryBot.create_list(:sales_log, 3, owning_organisation: user.organisation, created_by: user)
end
it "shows both lettings and sales logs" do
get "/logs"
expect(page).to have_content("6 total logs")
end
end
end