From 8ab077bed89d1a06621c7e2573ca1fb41489ee96 Mon Sep 17 00:00:00 2001 From: Cillian O'Ruanaidh Date: Mon, 19 Jun 2023 18:25:06 +0100 Subject: [PATCH] Create enterprise inside :it block because it's only needed there so far --- spec/system/admin/reports/users_and_enterprises_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/system/admin/reports/users_and_enterprises_spec.rb b/spec/system/admin/reports/users_and_enterprises_spec.rb index 858ed2ec6e..ff3f49aaf4 100644 --- a/spec/system/admin/reports/users_and_enterprises_spec.rb +++ b/spec/system/admin/reports/users_and_enterprises_spec.rb @@ -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([