-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Faker::Internet.password method doesn't add numbers anymore #2704
Comments
hi @isabel-anastasiadis-boost thanks for reporting this bug! You're right, the generator should include numbers. Is this happening only if specifying |
You're welcome! Oh yes, sorry, it happens without any arguments too. Those were just the arguments I was trying to use. |
One way to help with this generator is to improve the tests. They don't seem to be exercising the code as I was expecting. For example, if you simply change the expectation here:
to expect any number, the test pass. Ideally, beyond reinforcing the expected behavior by preventing bugs to be added, and documenting the code, the tests give us clarity about:
I have some ideas into how improve them, which would basically means not relying only regexes to test it. For example, I changed some tests here #2733 I'm going to close this for now and help with improving the tests are welcomed! Thanks for reporting the bug and for the help |
Describe the bug
The docs and comments suggest numbers are included, but looking at the source code it only includes lowercase, uppercase, and symbols.
To Reproduce
Describe a way to reproduce your bug. To get the Faker version, run
Faker::VERSION
.Use the reproduction script below to reproduce the issue:
Expected behavior
I would expect that you are guaranteed to have a number for all permutations, or that there is an extra parameter to ensure numbers are included
The text was updated successfully, but these errors were encountered: