Skip to content
This repository has been archived by the owner on Jun 10, 2018. It is now read-only.

global_phone_dbgen --test doesn't always generate valid phone numbers #1

Open
rubemz opened this issue Jun 10, 2013 · 0 comments · May be fixed by #2
Open

global_phone_dbgen --test doesn't always generate valid phone numbers #1

rubemz opened this issue Jun 10, 2013 · 0 comments · May be fixed by #2

Comments

@rubemz
Copy link

rubemz commented Jun 10, 2013

An easy way to see this error happening is adding to this test case the following assertion (since its fixture was generated by global_phone_dbgen --test):

assert number.valid?, "expected #{string} be valid for territory #{territory_name}"

And looks like this error is happening because for some country codes the phone formats are missing.

I'm hoping to use the generated list of phones as fixture to my tests, but it would need to always have valid phone numbers generated.

@rubemz rubemz linked a pull request Jun 11, 2013 that will close this issue
4 tasks
flyerhzm pushed a commit to flyerhzm/global_phone that referenced this issue Jul 14, 2015
These additions have been made -
* Ability to parse a phone number without territory being supplied.
* Ability to determine the type of the phone number. Possible types are - :fixed_line, :mobile, :fixed_line_or_mobile, :toll_free, :premium_rate, ...
* Methods to check if a number is fixed_line or mobile. If the type of the number is :fixed_line_or_mobile then both these methods will return true in such a case.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant