From b92c2f9bae418dcb2b4bab7ec5ce0f77bded271e Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Thu, 3 Jan 2019 15:40:26 +1300 Subject: [PATCH] Use slugs for look up in spec --- spec/controllers/plantings_controller_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/controllers/plantings_controller_spec.rb b/spec/controllers/plantings_controller_spec.rb index e2c6522be..c4a60d1a4 100644 --- a/spec/controllers/plantings_controller_spec.rb +++ b/spec/controllers/plantings_controller_spec.rb @@ -25,13 +25,13 @@ describe PlantingsController do end describe "picks up owner from params and shows owner's plantings only" do - before { get :index, params: { owner: member1.slug } } + before { get :index, params: { member_slug: member1.slug } } it { expect(assigns(:owner)).to eq member1 } it { expect(assigns(:plantings)).to eq [planting1] } end describe "picks up crop from params and shows the plantings for the crop only" do - before { get :index, params: { crop: maize.name } } + before { get :index, params: { crop_slug: maize.slug } } it { expect(assigns(:crop)).to eq maize } it { expect(assigns(:plantings)).to eq [planting2] } end