instructeurs: make the create form not using email directly
Before the form attempted to read an email value from the Instructeur model, and failed (because the empty Instructeur had no user yet). We could let `Instructeur#email` return `nil` if there is no User – but as a created Instructeur is always supposed to have a User, this seems like a nice safeguard to keep. So instead this commit rewrites the create form, which now doesn’t depend on an Instructeur model. Seems easy enough for now.
This commit is contained in:
parent
d78d206544
commit
f131dbb80d
6 changed files with 11 additions and 16 deletions
|
@ -12,7 +12,7 @@ feature 'As an instructeur', js: true do
|
|||
fill_in :instructeur_email, with: instructeur_email
|
||||
|
||||
perform_enqueued_jobs do
|
||||
click_button 'Valider'
|
||||
click_button 'Ajouter'
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue