From 103d1ce2eb8248041cde369f4cfe501414fead84 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Tue, 25 Jun 2019 20:39:50 +1200 Subject: [PATCH] rubocop lint --- app/controllers/plantings_controller.rb | 2 +- spec/views/harvests/edit.html.haml_spec.rb | 4 ++-- spec/views/harvests/new.html.haml_spec.rb | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/controllers/plantings_controller.rb b/app/controllers/plantings_controller.rb index 39f159e55..71a9c6b57 100644 --- a/app/controllers/plantings_controller.rb +++ b/app/controllers/plantings_controller.rb @@ -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 diff --git a/spec/views/harvests/edit.html.haml_spec.rb b/spec/views/harvests/edit.html.haml_spec.rb index 2d7398289..7733e28f4 100644 --- a/spec/views/harvests/edit.html.haml_spec.rb +++ b/spec/views/harvests/edit.html.haml_spec.rb @@ -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]" diff --git a/spec/views/harvests/new.html.haml_spec.rb b/spec/views/harvests/new.html.haml_spec.rb index 8d9ab0b88..37ce3388a 100644 --- a/spec/views/harvests/new.html.haml_spec.rb +++ b/spec/views/harvests/new.html.haml_spec.rb @@ -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 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]"