rubocop lint

This commit is contained in:
Brenda Wallace committed 2019-06-25 20:39:50 +12:00
1 parent 58d08ceb5a
commit 103d1ce2eb
3 files changed
+5 -5

No files matched your search

+1 -1
View File
@@ -61,7 +61,7 @@ class PlantingsController < ApplicationController
def edit
# the following are needed to display the form but aren't used
@crop = Crop.new
@crop = Crop.new
@gardens = @planting.owner.gardens.active.order_by_name
end
+2 -2
View File
@@ -10,8 +10,8 @@ describe "harvests/edit" do
assert_select "form", action: harvests_path, method: "post" do
assert_select "input#crop", class: "ui-autocomplete-input"
assert_select "input#harvest_crop_id", name: "harvest[crop_id]"
assert_select 'input', id: "harvest_plant_part_id_#{PlantPart.first.id}",
name: "harvest[plant_part_id]"
assert_select 'input', id: "harvest_plant_part_id_#{PlantPart.first.id}",
name: "harvest[plant_part_id]"
assert_select "input#harvest_quantity", name: "harvest[quantity]"
assert_select "input#harvest_weight_quantity", name: "harvest[quantity]"
assert_select "select#harvest_unit", name: "harvest[unit]"
+2 -2
View File
@@ -10,8 +10,8 @@ describe "harvests/new" do
assert_select "form", action: harvests_path, method: "post" do
assert_select "input#crop", class: "ui-autocomplete-input"
assert_select "input#harvest_crop_id", name: "harvest[crop_id]"
assert_select 'input', id: "harvest_plant_part_id_#{PlantPart.first.id}",
name: "harvest[plant_part_id]"
assert_select 'input', id: "harvest_plant_part_id_#{PlantPart.first.id}",
name: "harvest[plant_part_id]"
# some browsers interpret <input type="number"> without a step as "integer"
assert_select "input#harvest_quantity[step=any]", name: "harvest[quantity]"
assert_select "input#harvest_weight_quantity[step=any]", name: "harvest[quantity]"