Go from organisation edition back to organisation consultation

This commit is contained in:
echarp 2018-03-01 20:42:14 +01:00
parent 517fb30e55
commit d7eb4c9cf7
2 changed files with 3 additions and 3 deletions

View File

@ -26,7 +26,7 @@ class OrgasController < ApplicationController
@orga = Orga.new orga_params
respond_to do |format|
if @orga.save
format.html { redirect_to :root, notice: t('.ok') }
format.html { redirect_to @orga, notice: t('.ok') }
# 201 means :created
format.json { render action: 'show', status: 201, location: @orga }
else

View File

@ -37,7 +37,7 @@ class OrgasControllerTest < ActionDispatch::IntegrationTest
}
end
assert_redirected_to :root
assert_redirected_to assigns(:orga)
end
test 'should create minimalist orga' do
@ -53,7 +53,7 @@ class OrgasControllerTest < ActionDispatch::IntegrationTest
}
end
assert_redirected_to :root
assert_redirected_to assigns(:orga)
end
test 'should not create orga' do