el nombre del sitio es único

This commit is contained in:
f 2019-07-12 15:37:11 -03:00
parent afb68bfcbd
commit af68d93a6c
No known key found for this signature in database
GPG key ID: 2AE5A13E321F953D

View file

@ -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