Manually assign `notification_email` in the User factory when stubbed
Because we assign this value in the model via a callback conditionally
on `email_changed?`, this never gets set when using `build_stubbed`,
resulting in a "can't be blank" validation error on this field.
In this case, we can just assign it manually to the same value as
`email`, which is generated via a sequence.
Showing
Please
register
or
sign in
to comment