Fix announcement redirect

pull/4577/head
Oliver Günther 8 years ago
parent fa6cddfe39
commit 09f4034067
  1. 2
      app/controllers/announcements_controller.rb
  2. 2
      spec/controllers/announcements_controller_spec.rb

@ -15,7 +15,7 @@ class AnnouncementsController < ApplicationController
flash[:success] = t(:notice_successful_update) flash[:success] = t(:notice_successful_update)
end end
render action: 'edit' redirect_to action: 'edit'
end end
private private

@ -30,7 +30,7 @@ describe AnnouncementsController, type: :controller do
end end
it 'edits the announcement' do it 'edits the announcement' do
expect(response).to render_template '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[:success].to I18n.t(:notice_successful_update)
end end
end end

Loading…
Cancel
Save