mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-16 13:14:03 +00:00
Add proposal controller tests
This commit is contained in:
parent
e851c0b4ff
commit
f4678e5415
2 changed files with 575 additions and 4 deletions
|
|
@ -71,8 +71,8 @@ class ProposalController < ApplicationController
|
|||
@url = conference_program_proposal_path(@conference.short_title, params[:id])
|
||||
|
||||
if @event.update(event_params)
|
||||
redirect_to(conference_program_proposal_index_path(conference_id: @conference.short_title),
|
||||
notice: 'Proposal was successfully updated.')
|
||||
redirect_to conference_program_proposal_index_path(conference_id: @conference.short_title),
|
||||
notice: 'Proposal was successfully updated.'
|
||||
else
|
||||
flash[:error] = "Could not update proposal: #{@event.errors.full_messages.join(', ')}"
|
||||
render action: 'edit'
|
||||
|
|
@ -138,8 +138,8 @@ class ProposalController < ApplicationController
|
|||
end
|
||||
|
||||
if @event.save
|
||||
redirect_to(conference_program_proposal_index_path(conference_id: @conference.short_title),
|
||||
notice: "The proposal was re-submitted. The #{@conference.short_title} organizers will review it again.")
|
||||
redirect_to conference_program_proposal_index_path(conference_id: @conference.short_title),
|
||||
notice: "The proposal was re-submitted. The #{@conference.short_title} organizers will review it again."
|
||||
else
|
||||
redirect_to conference_program_proposal_index_path(conference_id: @conference.short_title),
|
||||
error: "Could not re-submit proposal: #{@event.errors.full_messages.join(', ')}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue