Add tests
This commit is contained in:
parent
363dfaa7d3
commit
cdea0e1218
14 changed files with 116 additions and 52 deletions
|
|
@ -24,7 +24,7 @@ class ChecklistsController < ApplicationController
|
|||
@checklist = Checklist.new(checklist_params)
|
||||
|
||||
if @checklist.save
|
||||
redirect_to [:edit, @checklist], notice: 'Checklist was successfully created.'
|
||||
redirect_to @checklist, notice: 'Checklist was successfully created.'
|
||||
else
|
||||
render :new, status: :unprocessable_entity
|
||||
end
|
||||
|
|
|
|||
|
|
@ -42,7 +42,12 @@ class SuccessCriteriaController < ApplicationController
|
|||
# DELETE /success_criteria/1
|
||||
def destroy
|
||||
@success_criterion.destroy!
|
||||
redirect_to success_criteria_url, notice: 'Success criterion was successfully destroyed.', status: :see_other
|
||||
respond_to do |format|
|
||||
format.html do
|
||||
redirect_to success_criteria_url, notice: 'Success criterion was successfully destroyed.', status: :see_other
|
||||
end
|
||||
format.turbo_stream
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue