Merge pull request #4704 from oliverguenther/fix/announcement-flash

Fix announcement flash type
pull/4706/merge
Oliver Günther 8 years ago committed by GitHub
commit aa51ef9c07
  1. 2
      app/controllers/announcements_controller.rb
  2. 2
      spec/controllers/announcements_controller_spec.rb

@ -12,7 +12,7 @@ class AnnouncementsController < ApplicationController
@announcement.attributes = announcement_params @announcement.attributes = announcement_params
if @announcement.save if @announcement.save
flash[:success] = t(:notice_successful_update) flash[:notice] = t(:notice_successful_update)
end end
redirect_to action: 'edit' redirect_to action: 'edit'

@ -31,7 +31,7 @@ describe AnnouncementsController, type: :controller do
it 'edits the announcement' do it 'edits the announcement' do
expect(response).to redirect_to action: :edit 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 end
end end

Loading…
Cancel
Save