index crops before testing crops#index

This commit is contained in:
Brenda Wallace
2019-12-20 09:18:16 +13:00
parent 97e9773c7e
commit 8c1761d40e

View File

@@ -7,7 +7,11 @@ describe "browse crops" do
let!(:rejected_crop) { FactoryBot.create :rejected_crop }
shared_examples 'shows crops' do
before { visit crops_path }
before do
Crop.reindex
visit crops_path
end
it "has a form for sorting by" do
expect(page).to have_css "select#sort"
end