From f3ffd6c0866f72581ef614fcab05ed431d871ee3 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Tue, 24 Dec 2019 22:11:14 +1300 Subject: [PATCH] remove extra index runs, use search:true from spec helper --- spec/features/harvests/browse_harvests_spec.rb | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/spec/features/harvests/browse_harvests_spec.rb b/spec/features/harvests/browse_harvests_spec.rb index 55827bcb1..a44672629 100644 --- a/spec/features/harvests/browse_harvests_spec.rb +++ b/spec/features/harvests/browse_harvests_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe "browse harvests" do +describe "browse harvests", :search do subject { page } let!(:harvest) { create :harvest, owner: member } @@ -13,10 +13,7 @@ describe "browse harvests" do describe 'blank optional fields' do let!(:harvest) { create :harvest, :no_description } - before do - Harvest.reindex - visit harvests_path - end + before { visit harvests_path } it 'read more' do expect(subject).not_to have_link "Read more" @@ -26,10 +23,7 @@ describe "browse harvests" do describe "filled in optional fields" do let!(:harvest) { create :harvest, :long_description } - before do - Harvest.reindex - visit harvests_path - end + before { visit harvests_path } it 'links to #show' do expect(subject).to have_link harvest.crop.name, href: harvest_path(harvest)