diff --git a/app/controllers/announcements_controller.rb b/app/controllers/announcements_controller.rb index b8fc819725..5927ab2780 100644 --- a/app/controllers/announcements_controller.rb +++ b/app/controllers/announcements_controller.rb @@ -12,7 +12,7 @@ class AnnouncementsController < ApplicationController @announcement.attributes = announcement_params if @announcement.save - flash[:success] = t(:notice_successful_update) + flash[:notice] = t(:notice_successful_update) end redirect_to action: 'edit' diff --git a/spec/controllers/announcements_controller_spec.rb b/spec/controllers/announcements_controller_spec.rb index fd83bdbb8e..454f23f11c 100644 --- a/spec/controllers/announcements_controller_spec.rb +++ b/spec/controllers/announcements_controller_spec.rb @@ -31,7 +31,7 @@ describe AnnouncementsController, type: :controller do it 'edits the announcement' do expect(response).to redirect_to action: :edit - expect(controller).to set_flash[:success].to I18n.t(:notice_successful_update) + expect(controller).to set_flash[:notice].to I18n.t(:notice_successful_update) end end end