Browse Source

Go from organisation edition back to organisation consultation

remotes/origin/master
echarp 5 years ago
parent
commit
d7eb4c9cf7
  1. 2
      app/controllers/orgas_controller.rb
  2. 4
      test/controllers/orgas_controller_test.rb

2
app/controllers/orgas_controller.rb

@ -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

4
test/controllers/orgas_controller_test.rb

@ -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

Loading…
Cancel
Save