el nombre del sitio es único
This commit is contained in:
parent
afb68bfcbd
commit
af68d93a6c
1 changed files with 7 additions and 0 deletions
|
@ -13,6 +13,13 @@ class SiteTest < ActiveSupport::TestCase
|
|||
assert site.destroy
|
||||
end
|
||||
|
||||
test 'el nombre tiene que ser único' do
|
||||
site = create :site
|
||||
site2 = build :site, name: site.name
|
||||
|
||||
assert_not site2.valid?
|
||||
end
|
||||
|
||||
test 'al destruir un sitio se eliminan los archivos' do
|
||||
site = create :site
|
||||
assert site.destroy
|
||||
|
|
Loading…
Reference in a new issue