mirror of
https://github.com/internetee/registry.git
synced 2025-08-11 20:19:34 +02:00
Story#110308584 - update tests of blocked domain
This commit is contained in:
parent
4739e19d63
commit
ba51028826
2 changed files with 2 additions and 23 deletions
|
@ -1,3 +1,3 @@
|
||||||
Fabricator(:blocked_domain) do
|
Fabricator(:blocked_domain) do
|
||||||
names ['ftp.ee', 'cache.ee']
|
name 'ftp.ee'
|
||||||
end
|
end
|
||||||
|
|
|
@ -7,28 +7,7 @@ describe BlockedDomain do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should have names array' do
|
it 'should have names array' do
|
||||||
@blocked_domain.names.should == []
|
@blocked_domain.name.should == nil
|
||||||
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
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue