Remove unnecessary before action

Each context has different setup and needs to load the page after setup.
This commit is contained in:
David Cook
2026-02-24 15:57:44 +11:00
parent 0f3b299544
commit e565243ce4

View File

@@ -35,11 +35,9 @@ RSpec.describe 'As an enterprise user, I can browse my products' do
let!(:p1) { create(:product, name: "Product1") }
let!(:p2) { create(:product, name: "Product2") }
before do
visit admin_products_url
end
it "displays a list of products" do
visit admin_products_path
within ".products" do
# displays table header
expect(page).to have_selector "th", text: "Name"