Ensure generated numbers are always numbers

This commit is contained in:
Martin Lensment 2015-04-23 11:22:06 +03:00
parent 12e32af524
commit f838a6506c
5 changed files with 14 additions and 2 deletions

View file

@ -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