Fixed contact prefix tests

This commit is contained in:
Priit Tark 2015-05-04 15:01:14 +03:00
parent 60d564d098
commit 2b037fdf00
2 changed files with 4 additions and 3 deletions

View file

@ -136,9 +136,9 @@ describe Contact do
@contact.errors.full_messages.should match_array([])
end
it 'should not accept new custom code' do
it 'should not overwrite code' do
old_code = @contact.code
@contact.code = 'CID:REG1:12345'
@contact.code = 'CID:REG1:should-not-overwrite-old-code-12345'
@contact.save.should == true
@contact.code.should == old_code
end

View file

@ -90,7 +90,8 @@ describe Registrar do
end
it 'should have contact prefix' do
@registrar.contact_prefix.should == 'CID:REGISTRAR0'
@registrar = Fabricate.build(:registrar, code: 'CUSTOMCODE')
@registrar.contact_prefix.should == 'CID:CUSTOMCODE'
end
it 'should have one version' do