mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-24 16:58:35 -04:00
Rubocop lint
This commit is contained in:
@@ -52,8 +52,8 @@ describe CropsController do
|
||||
|
||||
describe 'perform a search' do
|
||||
before { get :search, params: { term: 'tom' } }
|
||||
it { expect(assigns(:term)).to eq 'tom'}
|
||||
it { expect(assigns(:crops).map(&:name)).to eq ['tomato']}
|
||||
it { expect(assigns(:term)).to eq 'tom' }
|
||||
it { expect(assigns(:crops).map(&:name)).to eq ['tomato'] }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -146,12 +146,12 @@ describe Photo do
|
||||
seed.photos << seed_photo
|
||||
end
|
||||
|
||||
it { expect(Photo.by_model(Harvest)).to eq([ harvest_photo ]) }
|
||||
it { expect(Photo.by_model(Planting)).to eq([ planting_photo ]) }
|
||||
it { expect(Photo.by_model(Seed)).to eq([ seed_photo ]) }
|
||||
it { expect(Photo.by_model(Harvest)).to eq([harvest_photo]) }
|
||||
it { expect(Photo.by_model(Planting)).to eq([planting_photo]) }
|
||||
it { expect(Photo.by_model(Seed)).to eq([seed_photo]) }
|
||||
|
||||
it { expect(Photo.by_crop(harvest_crop)).to eq([ harvest_photo ]) }
|
||||
it { expect(Photo.by_crop(planting_crop)).to eq([ planting_photo ]) }
|
||||
it { expect(Photo.by_crop(seed_crop)).to eq([ seed_photo ]) }
|
||||
it { expect(Photo.by_crop(harvest_crop)).to eq([harvest_photo]) }
|
||||
it { expect(Photo.by_crop(planting_crop)).to eq([planting_photo]) }
|
||||
it { expect(Photo.by_crop(seed_crop)).to eq([seed_photo]) }
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
module FeatureHelpers
|
||||
def fill_autocomplete(field, options = {})
|
||||
Crop.reindex if ENV["GROWSTUFF_ELASTICSEARCH"] == "true"
|
||||
|
||||
|
||||
fill_in field, with: options[:with]
|
||||
|
||||
page.execute_script " $('##{field}').trigger('focus'); "
|
||||
|
||||
Reference in New Issue
Block a user