• Robert Speicher's avatar
    Manually assign `notification_email` in the User factory when stubbed · 76544283
    Robert Speicher authored
    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.
    76544283
users.rb 1.73 KB