Add test for conference registration controller show and destroy action
After failed delete, user should be redirected to registration show and not root.
This commit is contained in:
parent
80a06b99b4
commit
19157ac81d
3 changed files with 96 additions and 2 deletions
|
|
@ -90,8 +90,8 @@ class ConferenceRegistrationsController < ApplicationController
|
|||
redirect_to root_path,
|
||||
notice: "You are not registered for #{@conference.title} anymore!"
|
||||
else
|
||||
redirect_to root_path,
|
||||
error: "Could not update your registration for #{@conference.title}: "\
|
||||
redirect_to conference_conference_registrations_path(@conference.short_title),
|
||||
error: "Could not delete your registration for #{@conference.title}: "\
|
||||
"#{@registration.errors.full_messages.join('. ')}."
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue