Skip to content
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::Number.leading_zero_number should always start with 0 #1334

Merged
merged 5 commits into from
Aug 23, 2018
Merged

Faker::Number.leading_zero_number should always start with 0 #1334

merged 5 commits into from
Aug 23, 2018

Conversation

vbrazo
Copy link
Member

@vbrazo vbrazo commented Aug 16, 2018

This PR fixes #1333.

@vbrazo vbrazo self-assigned this Aug 16, 2018
@vbrazo vbrazo changed the title Leading_zero_number should always start with 0 Faker::Number.leading_zero_number should always start with 0 Aug 16, 2018
@@ -8,6 +8,11 @@ def setup
@tester = Faker::Number
end

def test_leading_zero_number
assert @tester.leading_zero_number.match(/[0-9]{10}/)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess regexps should looks like
/^0[0-9]{9}/

@vbrazo vbrazo merged commit 4a0aa1d into faker-ruby:master Aug 23, 2018
davidmorton0 pushed a commit to davidmorton0/faker that referenced this pull request Jul 12, 2021
…uby#1334)

* Leading_zero_number should always start with 0

* Update changelog

* Fix leading number tests

* Update changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Faker::Number.leading_zero_number returns wrong output
2 participants