mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 00:42:04 +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
|
@ -30,4 +30,31 @@ describe Registrar do
|
|||
@registrar.errors[:billing_email].should == ['is invalid']
|
||||
end
|
||||
end
|
||||
|
||||
context 'with valid attributes' do
|
||||
before :all do
|
||||
@registrar = Fabricate(:registrar)
|
||||
end
|
||||
|
||||
it 'should be valid' do
|
||||
@registrar.valid?
|
||||
@registrar.errors.full_messages.should match_array([])
|
||||
end
|
||||
|
||||
it 'should be valid twice' do
|
||||
@registrar = Fabricate(:registrar)
|
||||
@registrar.valid?
|
||||
@registrar.errors.full_messages.should match_array([])
|
||||
end
|
||||
|
||||
it 'should have one version' do
|
||||
with_versioning do
|
||||
@registrar.versions.should == []
|
||||
@registrar.name = 'New name'
|
||||
@registrar.save
|
||||
@registrar.errors.full_messages.should match_array([])
|
||||
@registrar.versions.size.should == 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue