mirror of
https://github.com/internetee/registry.git
synced 2025-07-20 09:46:09 +02:00
Added some missing model specs + PaperTrail session fix
This commit is contained in:
parent
c248a957a6
commit
a637eb5e01
39 changed files with 1447 additions and 845 deletions
|
@ -67,19 +67,26 @@ describe Contact do
|
|||
@contact.errors.full_messages.should match_array([])
|
||||
end
|
||||
|
||||
it 'should not have relation' do
|
||||
@contact.relations_with_domain?.should == false
|
||||
it 'should be valid twice' do
|
||||
@contact = Fabricate(:contact)
|
||||
@contact.valid?
|
||||
@contact.errors.full_messages.should match_array([])
|
||||
end
|
||||
|
||||
it 'should not have one version' do
|
||||
it 'should have one version' do
|
||||
with_versioning do
|
||||
@contact.versions.should == []
|
||||
@contact.versions.reload.should == []
|
||||
@contact.name = 'New name'
|
||||
@contact.save
|
||||
@contact.errors.full_messages.should match_array([])
|
||||
@contact.versions.size.should == 1
|
||||
end
|
||||
end
|
||||
|
||||
it 'should not have relation' do
|
||||
@contact.relations_with_domain?.should == false
|
||||
end
|
||||
|
||||
# it 'ico should be valid' do
|
||||
# @contact.ident_type = 'ico'
|
||||
# @contact.ident = '1234'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue