mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 10:45:58 +02:00
Ensure generated numbers are always numbers
This commit is contained in:
parent
12e32af524
commit
f838a6506c
5 changed files with 14 additions and 2 deletions
|
@ -32,6 +32,12 @@ describe Registrar do
|
|||
it 'should not have valid code' do
|
||||
@registrar.code.should == nil
|
||||
end
|
||||
|
||||
it 'should generate reference number' do
|
||||
@registrar.generate_iso_11649_reference_no
|
||||
@registrar.reference_no.should_not be_blank
|
||||
@registrar.reference_no.last(10).to_i.should_not == 0
|
||||
end
|
||||
end
|
||||
|
||||
context 'with valid attributes' do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue