No need to update column as the sign_up process activates the user
This commit is contained in:
parent
2cb8041560
commit
e290fc3674
2 changed files with 5 additions and 4 deletions
|
@ -3,6 +3,7 @@ require 'spec_helper'
|
|||
feature 'As an administrateur', js: true do
|
||||
let(:administration) { create(:administration) }
|
||||
let(:admin_email) { 'new_admin@gouv.fr' }
|
||||
let(:new_admin) { Administrateur.find_by(email: admin_email) }
|
||||
|
||||
before do
|
||||
perform_enqueued_jobs do
|
||||
|
@ -11,6 +12,8 @@ feature 'As an administrateur', js: true do
|
|||
end
|
||||
|
||||
scenario 'I can register' do
|
||||
expect(new_admin.reload.active?).to be(false)
|
||||
|
||||
confirmation_email = open_email(admin_email)
|
||||
token_params = confirmation_email.body.match(/token=[^"]+/)
|
||||
|
||||
|
@ -20,5 +23,7 @@ feature 'As an administrateur', js: true do
|
|||
click_button 'Continuer'
|
||||
|
||||
expect(page).to have_content 'Mot de passe enregistré'
|
||||
|
||||
expect(new_admin.reload.active?).to be(true)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue