Skip to content

Instantly share code, notes, and snippets.

@kinisoftware
Created September 8, 2010 12:13
Show Gist options
  • Save kinisoftware/570036 to your computer and use it in GitHub Desktop.
Save kinisoftware/570036 to your computer and use it in GitHub Desktop.
import grails.test.*
class VisitaUnitTest extends GrailsUnitTestCase {
protected void setUp() {
super.setUp();
}
protected void tearDown() {
super.tearDown();
}
public void testNuevaVisita(){
def visita = new Visita()
visita.mensaje = 'Hola que tal'
def testInstances = [visita]
mockDomain(Visita, testInstances)
visita.save()
Visita.list().each { visitaLoaded ->
assertNotNull visitaLoaded
assertEquals visitaLoaded.mensaje, visita.mensaje
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment