Created
September 8, 2010 12:13
-
-
Save kinisoftware/570036 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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