add administrateur from manager

This commit is contained in:
Christophe Robillard 2020-02-18 16:41:56 +01:00
parent 51f7b41ab4
commit 32d1ebe565
2 changed files with 25 additions and 0 deletions

View file

@ -1,6 +1,18 @@
describe Manager::AdministrateursController, type: :controller do
let(:administration) { create(:administration) }
describe 'GET #new' do
render_views
before do
sign_in administration
end
it 'displays form to create a new admin' do
get :new
expect(response).to be_success
end
end
describe 'POST #create' do
let(:email) { 'plop@plop.com' }
let(:password) { 'démarches-simplifiées-pwd' }