Story#110308584 - update tests of blocked domain

This commit is contained in:
Vladimir Krylov 2016-04-15 13:34:22 +03:00
parent 4739e19d63
commit ba51028826
2 changed files with 2 additions and 23 deletions

View file

@ -7,28 +7,7 @@ describe BlockedDomain do
end
it 'should have names array' do
@blocked_domain.names.should == []
end
end
context 'with valid attributes' do
before :all do
@blocked_domain = Fabricate(:blocked_domain)
end
it 'should be valid' do
@blocked_domain.valid?
@blocked_domain.errors.full_messages.should match_array([])
end
it 'should have one version' do
with_versioning do
@blocked_domain.versions.should == []
@blocked_domain.names = ['bla.ee']
@blocked_domain.save
@blocked_domain.errors.full_messages.should match_array([])
@blocked_domain.versions.size.should == 1
end
@blocked_domain.name.should == nil
end
end
end