From a2abe79e6f3aaed79bd06e0dacb82e87bdcbc62f Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Mon, 26 Oct 2026 19:56:13 +1030 Subject: [PATCH] Fix Translation missing en.seeds.updated (#5100) * Fix missing en.seeds.updated translation Add missing updated key under the seeds scope in config/locales/en.yml and add controller test verifying flash notice on seed update. Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com> * Update SeedsController test route parameter to use slug Seeds routes use param: :slug. Updated test parameter key from id to slug. Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com> --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> --- config/locales/en.yml | 1 + spec/controllers/seeds_controller_spec.rb | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/config/locales/en.yml b/config/locales/en.yml index 90ebd7788..08155ea5a 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1000,6 +1000,7 @@ en: save_seeds: Save seeds string: "%{crop} seeds belonging to %{owner}" added_to_stash: Successfully added %{crop} seed to your stash. + updated: Seed was successfully updated. unauthorized: create: all: Please sign in or sign up to create a %{subject}. diff --git a/spec/controllers/seeds_controller_spec.rb b/spec/controllers/seeds_controller_spec.rb index fad615529..4525a6c12 100644 --- a/spec/controllers/seeds_controller_spec.rb +++ b/spec/controllers/seeds_controller_spec.rb @@ -272,4 +272,15 @@ describe SeedsController do it { expect(assigns(:planting)).to eq(planting) } end end + + describe 'PATCH update' do + let!(:seed) { create(:seed, owner:) } + + before { sign_in owner } + + it 'updates seed and sets flash notice' do + patch :update, params: { slug: seed.to_param, seed: { description: 'Updated seed notes' } } + expect(flash[:notice]).to eq('Seed was successfully updated.') + end + end end