Rubocop lint

This commit is contained in:
Brenda Wallace
2019-04-13 09:50:49 +12:00
parent fa1913c8b6
commit 026efe5d15
3 changed files with 9 additions and 9 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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'); "