From dc97bbf306f818c8bb9bbc2c23aec261aaee1531 Mon Sep 17 00:00:00 2001 From: Sam Seed Date: Wed, 7 Dec 2022 12:39:20 +0000 Subject: [PATCH] test: move scheme params def onto 1 line --- spec/requests/schemes_controller_spec.rb | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/spec/requests/schemes_controller_spec.rb b/spec/requests/schemes_controller_spec.rb index 7eca070b0..5530600ff 100644 --- a/spec/requests/schemes_controller_spec.rb +++ b/spec/requests/schemes_controller_spec.rb @@ -492,11 +492,7 @@ RSpec.describe SchemesController, type: :request do context "when the organisation id param is included" do let(:organisation) { FactoryBot.create(:organisation) } - let(:params) do - { scheme: { - owning_organisation: organisation, - } } - end + let(:params) { { scheme: { owning_organisation: organisation } } } it "sets the owning organisation correctly" do post "/schemes", params: params @@ -602,11 +598,7 @@ RSpec.describe SchemesController, type: :request do context "when organisation id param refers to a non-stock-owning organisation" do let(:organisation_which_does_not_own_stock) { FactoryBot.create(:organisation, holds_own_stock: false) } - let(:params) do - { scheme: { - owning_organisation_id: organisation_which_does_not_own_stock.id, - } } - end + let(:params) { { scheme: { owning_organisation_id: organisation_which_does_not_own_stock.id } } } it "displays the new page with an error message" do post "/schemes", params: params