Is the email address that I set using Faker in RSpec real?
I don't have it yet, but when I started creating a feature that would send mail to users,
I think it would be a problem if the email was unintentionally sent to the email address I set using Faker.
For example, if the domain is configuring something that is impossible, I don't think there's much to worry about.Please let me know if you know.
By the way, in my previous work, if I send it to the domain of example.com, the email address does not exist, so
I've been taught to set it up.
Depending on the generation method, it can also be used for real emails.
example.org
and example.net
.
https://github.com/stympy/faker/blob/master/doc/internet.md
Faker::Internet.free_email#=>"[email protected]"
Faker::Internet.free_email('Nancy')#=>"[email protected]"
Faker::Internet.safe_email#=>"[email protected]"
Faker::Internet.safe_email('Nancy')#=>"[email protected]"
© 2024 OneMinuteCode. All rights reserved.