Create enterprise inside :it block because it's only needed there so far

This commit is contained in:
Cillian O'Ruanaidh
2023-06-19 18:25:06 +01:00
committed by Konrad
parent 1984a1feeb
commit 8ab077bed8

View File

@@ -5,14 +5,14 @@ require 'system_helper'
describe "Users & Enterprises reports" do
include AuthenticationHelper
let!(:enterprise) { create(:supplier_enterprise) }
before do
login_as_admin
visit main_app.admin_report_path(report_type: 'users_and_enterprises')
end
it "displays the report" do
enterprise = create(:supplier_enterprise)
click_button 'Go'
expect(page.find("table.report__table thead tr").text).to have_content([