mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-11-04 20:22:47 -05:00
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>
This commit is contained in:
2 files changed
+12
No files matched your search
@@ -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}.
|
||||
|
||||
@@ -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
|
||||
Reference in new issue
Block a user